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
|
With the release of 3.11, my code was working fine. I upgraded to the 12/13 nightly, and the code is now throwing exceptions. I just upgraded to test out the 12/29 nightly, and it's still broken. The generated (MSSQL) SQL is: A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Note the bolded line. It should read: SUM(COALESCE(t1.Amount, 0)) The MSSQL schema is a simple 1:M. The LINQ query looks like this: from c in UnitOfWorkScope.Current.Collections If you need me to put together a sample, I can. I was hoping this info would be enough to get a quick fix going. Thanks. Dan |
|
|
Hi Dan, If you could either attach or mail through your model then that should be all we need to investigate this further.
Jeremy |
|
|
Hi Dan, Sorry for the delay in getting back to you on this. I cant actually replicate this behavior. When performing the query as you specified in the post above it does perform the projection server side correctly on t1 (CollectionDetails). However the SQL you posted does look a bit different from the query would be generating - Ive somewhat replicated this, however the projection is done client side for me - are you able to post the actual LINQ query which generates the SQL you specified? Here is the one I have been using which roughly gets the same SQL (but not the projection list): var q = from c in unitOfWork.Collections
Thanks! Jeremy |
|
|
I bundled up a test project and sent it to you. Thanks for looking into this. |
|
|
Thanks Dan, Have reproed this issue and included an update into the next nightly build (20110112) which correctly supports this.
Jeremy |
|