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 there, I loaded an entity "Developer" and some fields of a 1:many associated collection "AddIns" via an aggregate. The select for a single Developer looks right: SELECT
No the strange part: when accessing any properties another select is fired to get that value. For example when accessing the "EMailAddress" this is fired: SELECT
I debugged the situation and it looks like this: While the property fields are filled - the corresponding backing fields are null? When accessing an property, the SQL for getting the value is fired. That looks wrong. Kind regards,
|
|
|
Could you post the code for the Developer and AddIn entities please? Thanks! |
|
|
Please find the Model and the generated code at the attachment. |
|
|
Thanks. Unfortunately I still can't reproduce your issue. When I use the "EditDeveloper" aggregate, I see all Developer and AddIn fields being loaded, and accessing the EmailAddress field does not cause a second SQL query. When I use the "ViewDeveloperInfo" aggregate, I see the relevant Developer fields being loaded, excluding the EmailAddress field, which is lazy loaded -- but that is correct for that aggregate. I'm also puzzled by the AddIn SQL, because in the model you provide, all the AddIn fields are always eager, so should always be included in the SQL (unless you are doing a projection). Could you provide us with code that exhibits the redundant load issue? Thanks! |
|