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
|
Is there a simple way to know that the property of the entity has been changed? I need this tool to perform custom validation, if I know that the property not changed, (when EntityState == EntityState.Modified), then I can skip validation and allow changes to pass. I can create a wrapper around target entity based on PropertyChanged event, but this solution is unreasonably complex. There must be method inside LS opposite to MarkPropertyChanged, it would be great to get access to it. Or maybe there is another solution that I didn't find? |
|
|
Yes you can use Change Tracking to determine this: http://www.mindscapehq.com/documentation/lightspeed/Implementing-Storage-Policies-with-LightSpeed/Change-Tracking :)
|
|
|
I read that info before posting and was alarmed by the phrase "it can add a significant overhead to the size of each entity". Is it means that entity holds another copy of fields with initial values or something like that? If so, then it is acceptable. |
|
|
Hi, The reason for that comment is because it holds a copy of the original value, yes. That value could (for some people), but a large blob of data. So we wanted to draw attention to the fact that it will use more memory to track that. If you're not storing media etc in your entity fields being tracked it shouldn't be an issue. I hope that helps John-Daniel Trask |
|