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 Andrew, Can you please review the attached repro to determine if there is anything that can be tweaked with the query optimiser (or my query) to reduce the number of sub-selects performed when retrieving the associated entities in my example scenario? Cheers, Greg |
|
|
Try this: Repository.Find<Contract>(!Entity.Attribute("ContractStatus.Name").In("Status 1", "Status 2", "Status 3", "Status 4")); Cheers, Andrew. |
|
|
Hi Andrew, Thanks - in trying the above suggestion I've discovered an inconsistency in the generation of a query. The attached (updated) repro shows that changing the order of the query expression arguments causes a bad expression tree to be generated (the Active parameter ends up being attached to the Contract rather than the Customer as it should be). Anyway, as I can reverse the order of the query arguments, this isn't holding me up - just thought you might like to fix sometime. Cheers, Greg |
|
|
Hi Greg, Thanks for the repro. I'll investigate. Cheers, Andrew. |
|
|
Hi Greg, This issue is fixed in tonight's build. Thanks for raising it. Cheers, Andrew. |
|