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
|
Good day. I created user-defined data type "JStringList" that is internally a list (ObservableCollection) of strings. It is saved in database as JSON array. The problem is: When i load existing entity from the database and then modify it's property (by changing list contents), LightSpeed ORM does not detect such changes.
If i change property in the following way, then changes are properly detected:
Is there any way to detect changes when entity property was changed by the first way? JStringList implements INotifyPropertyChanged interface, but it does not help. Thanks. |
|
|
No, We don't support lists as entity properties, we expect entity properties will be assigned a new value which allows us to track the change in state (was value A, is now value B). For the first example you are not changing the property value, you are just changing the internal state in the value you have already assigned. What I would recommend is to make the list a transient property and have the existing property become a string which holds the serialised form. You can hook its property change event to update the value of the serialised property which will flag that property as dirty and the entity as modified.
|
|