Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Designer generated LINQ generates wrong SQL when table is joined multiple times
 

Pages: 1 2
Bugs & Issues
Designer generated LINQ generates wrong SQL when table is joined multiple times
Page:2/2 

  Print all messages in this thread  
Poster Message
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37797 posts
# Posted on: 07-Feb-2018 12:05:51.  
Reproduced with the query you gave, and store being a TPE subtype of customer.

Looks like it tries to find 'Rowguid' and as the subtype field name is changed, it finds one but that's the wrong one.

I *hope* this is fixable...
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37797 posts
# Posted on: 07-Feb-2018 14:22:41.  
Man, you won't believe it. I really was stumped how to fix this, it felt impossible, as the place where it adds the fields to the various projections doesn't know about derived tables yet.

I noticed however that the code which constructs the list of fields to add to the projection when it adds the whole entity to the projection (the select new {c, soh}) used the wrong hierarchyfields call and the inherited fields weren't marked as fields in a subtype.

Corrected that and the fix issued earlier in this thread now picked up the renamed field and it works now also in this scenario, like it should.

*pfew* Regular Smiley

Releasing new hotfixes in a minute


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37797 posts
# Posted on: 07-Feb-2018 16:46:11.  
Hotfix 5.2.6 and 5.3.3 fix this issue.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
TomDog
User



Location:
Wellington, New Zealand
Joined on:
25-Oct-2005 22:21:17
Posted:
570 posts
# Posted on: 08-Feb-2018 12:03:53.  
Sounds like a relatively easy fix once you found it.
It can be a relief when a bug is just a mistake rather than a scenario that hasn't been catered for.

Thanks for sorting it Regular Smiley


Jeremy Thomas
VS 2017 C#, LLBLGen v5.4, Winforms, WPF and ASP.NET MVCLLBL & LinqPad
 
Top
Pages: 1 2  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.