Dto Generation Error

Posts   
 
    
TopDog74
User
Posts: 40
Joined: 27-Apr-2012
# Posted on: 01-Nov-2016 13:00:17   

Hi, I'm using version 5.0 (5.0.7) RTM.

I have created a few Dto's in a DerivedModel. My EntityModel has awful naming conventions, so i have given the property names on my DTOs nice readable names. This works fine unless i edit the Primary Key Property Name on the DTO. If i do this, i get an error on the on 'CreatePkPredicate' method.

I think the property names are backwards:


public static System.Linq.Expressions.Expression<Func<EntityClasses.PurchorderEntity, bool>> CreatePkPredicate(IEnumerable<DtoClasses.PurchaseOrderDto> dtos)
        {
            var ids = dtos.Select(p__1=>p__1.CoyId).ToList();
            return p__0 => ids.Contains(p__0.AccountingCompanyId);
        }

In this example if i switch it round to:


public static System.Linq.Expressions.Expression<Func<EntityClasses.PurchorderEntity, bool>> CreatePkPredicate(IEnumerable<DtoClasses.PurchaseOrderDto> dtos)
        {
             var ids = dtos.Select(p__1 => p__1.AccountingCompanyId).ToList();
            return p__0 => ids.Contains(p__0.CoyId);
        }

Maybe it's already been identified, but i couldn't see it in the forum anywhere.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 02-Nov-2016 09:32:09   

Looking into it. Btw, this forum is for v5.1 beta feedback, so I've moved the thread.

I assume the entity PK field is 'CoyId' and your field in the DTO derived from that is 'AccountingCompanyId' ?

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 02-Nov-2016 09:48:39   

Fixed in next 5.0.8 hotfix build.

Frans Bouma | Lead developer LLBLGen Pro
TopDog74
User
Posts: 40
Joined: 27-Apr-2012
# Posted on: 02-Nov-2016 18:09:38   

yes, your assumption is correct. Thanks for the quick turnaround simple_smile