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
|
Hi, I am having property setters hit on my domain classes when the TypeModel is initializing. It seems the initialize method of Utils.PropertyNameCache is enumerating all properties and then calling there setters. In some domain objects some propertys are used to update global contexts, however, I have no way to guard against these sets. Correct me if I'm wrong, but is the PropertyNameCache for the new Get and Set methods? I actually employ codgen to get the model design up and really don't use this feature set, would it be wise to disable it? Also, I know it is in the backlog to add a IsLoading flag. This would really help guard against these types of situations where the object is loading or getting hit outside of any normal CRUD. Thanks again, Kavan |
|
|
Hi Kavan, I can probably pretty easily add a configuration option to disable the property name cache feature. This would make sense if you're using code gen. Cheers, Andrew. |
|
|
Hi Andrew, That would definetly be helpful. Anything on a IsLoading flag? Thanks again, Kavan |
|
|
Hi Kavan, Were you having a particular issue around object initialization? The reason I ask is that LightSpeed, by design, only accesses the instance fields directly. (Apart from the property name cache initialization issue which I'm going to make optional). Cheers, Andrew. |
|
|
Ok, tonights build will have the new configuration option DetectPropertyNames. Set this to false if you are specifying the property names manually. Cheers, Andrew. |
|
|
Hi Andrew, The IsLoading flag would help more with initializing internal object state. Currently their is no hard way to detect if an object is really new or just being created on a load. Thanks, Kavan |
|
|
Hi Kavan, Tonights build will have the new entity hook methods BeforeLoad and AfterLoad which are fired before/after an entity is loaded from the database. Cheers, Andrew. |
|