This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, Is it possible to assign default value from column in a table to property in an entity? Let’s say I have table TBCUsers in my database, the table has column ‘Location’ with default value set as ‘Germany’. This table is then mapped as TBCUser entity. I would expect that during creation of new entity:
property user.Location is set as “Germany”. However it isn’t. I couldn’t find direct settings in Lighspeed to achieve such behavior. If it is not possible now do you have plans for such functionality in next releases of Lightspeed? As a workaround I have partial class from TBCuser and I set default values in TBCuser constructor but this approach need to be repeated for each newly mapped entity… Regards. |
|
|
There is no setting for this. We leave it to you to add any default values that should be set in the constructor as required.
|
|