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
|
I have a Foo entity with a one-to-one association with a Bar entity (a Foo's Bar may be null, but not vice-versa). I want to always load the Bar when loading Foos. I've seen lots of documentation and posts about EagerLoad as it relates to one-to-many associations, but nothing for one-to-one associations (except that they're lazy loaded by default). I'm using the designer, so I can't attribute my code manually. The arrows in the designer for one-to-many associations have the Eager Load options, but the one-to-one arrows don't. In the Target Custom Attributes I tried setting EagerLoad, but this attribute gets set on the property when it needs to appear on the field. Is there a way to do this with the designer? |
|
|
I have added this feature to the designer and it will be included in nightly builds dated 24 Mar 2009 and above, available from about 1430 GMT. Select the association arrow, and set the Eager Load Source and/or Eager Load Target properties according to which direction(s) you want to be eager loaded. Please let us know if you run into any problems -- thanks! |
|
|
Hi Ivan, I am encountering an issue with the one-to-one eager loading. Organisation > OrganisationFinancialDetails LightSpeed definitely eager loads the associated financial details entity to begin with, but then any references to a previously loaded financial details entity are re-loaded again each time the Organisation.OrganisationFinancialDetails entity is accessed. Any ideas? Bert |
|
|
Hello Bert, It looks like we had a bug which was causing a redundant re-query. I've committed a patch which should address the issue for you and this will be included in nightly builds dated 29 Aug 2009 and above. Let me know if you still see superfluous queries. |
|