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
|
It seems that EagerLoad does not work when you do a join in LS 3.0 Is this by design? example: var q = from t in work.MaterialDefs.WithAggregate("MatDef") This query can be re-written as var q = from t in work.MaterialDefs.WithAggregate("MatDef") But I am curios if I will need this in the future when I cant re-write a join in this way. I am thinking if I am doing a one to many join (instead of a many to one) that it would make a difference? |
|
|
Hi Tommy, The WithAggregate extension which assigns the Aggregate property on the query is supported on the primary entity type in the query, but not on other types which may have been joined in and returned. We cannot currently support aggregates on the non primary types at this stage mainly because of the way our Query object works and this is currently by design, but that is something which would be good to support so I have added an item to our backlog for this. In the code above, assuming work refers to an IUnitOfWork instance and the eager load attributes are applied to the MaterialDef which would be the primary entity in the query then this should be working fine - if you believe this is the case and its not working could you please send through a small repro of this, as this is working happily for us in examples here.
Jeremy |
|
|
I tried WithAggregate and also a normal Eagerload in the designer. Both did not return the requested eager load associations from MaterialDef. I tried An EagerLoad on EntityRef and EntityCollection (Designer Generated) on MaterialDefs associations. When I get time I will send a repo app. |
|