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 guys, Just wondering if the following is expected behavior for LS4... I have an entity that has some of its fields as part of a named aggregate - hence those fields are not loaded by default. I have set the entity to use the 2nd level cache. If I issue an identity query for the entity without the aggregate name, the partial entity is retrieved and added to the 2nd level cache - as expected. However, if a subsequent query hits the 2nd level cache, the entity retrieved from the cache no longer supports lazy loading of the fields contained within the named aggregate - the fields just return null when accessed. It seems the entity is not being fully enlisted in the UnitOfWork. Any thoughts? Cheers, Greg PS. This previous forum entry seems to describe the same issue: http://www.mindscapehq.com/forums/thread/272823 |
|
|
Yes this does appear to be how it operates although I dont really consider this to be the right behavior so I will have a look at whats involved in updating this and then I will probably look at releasing this update via a compatibility flag to avoid breaking the current behavior for now. I will let you know once I have looked in to making this update tomorrow.
|
|
|
Thanks Jeremy. Out of curiosity - in what situation do you think this behavior would be valid in that it needs a compatibility flag? Cheers, Greg |
|
|
I believe the current behavior is wrong, but it is the current behavior and has been this was since v1 so its for that reason I will be adding in the need for a compatibility flag for now to avoid any nasty surprises for anyone who is actually relying on this. We typically make these breaking changes more permanent when we rev the major version so I would look at switching it over proper for 5.0 :)
|
|
|
Hi Greg, I have added in an update for this now and this will be available in the next nightly build. To make use of this you will need to enable the new EnableV5CacheBehavior compatibility flag on your context object. As mentioned, the intention will be to drop the need for this flag with 5.0. e.g.
Let me know once you have had a chance to grab the nightly and have a test with this.
|
|