new code generation did not match before

Posts   
 
    
Albert1945
User
Posts: 6
Joined: 21-Nov-2007
# Posted on: 11-Aug-2008 13:43:47   

we use LLBLGEN Pro Version 1.0.2004.2 Final we use Erwin 3.5.2 for data modeling diagram we use Arts401 Datamodel for retail store by Arts Assc

I have problem with entities tha have two association with one entity. The generated class was not match before altough we have not database change on it all class are correct except entities that has two association with one entity In old generation it use the first association and in new generation it use the other association. I dont know why. But I have never seen this in all 25 database change process except in this one. I try every thing and do everything correctly several times but the problem still exist. I attached my datamodel and generated llblgen entity class for you. please help me yours Albert.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 11-Aug-2008 13:54:25   

Please post the LLBLGen project file too.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 11-Aug-2008 14:25:07   

You don't have to create to threads to post the following link: project file

We will delete the other 2 threads.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 11-Aug-2008 15:00:38   

This is what I found matching the llblgen pro project file against the old and new generated ReportingPeriodEntity.cs

You have 2 relations defined between CalendarPeriod & ReportingPeriod

ReportingPeriod refers to CalendarPeriod through the following fields:

The first relation: CalendarID, CalendarLevelID & StartCalendarPeriodID

The second relation: CalendarID, CalendarLevelID & EndCalendarPeriodID

In the Designer both of these relations are realised and also in both of the generated code files (OLD & NEW).

But they are switched comparing the OLD & NEW project files.

The fields mapped on relation: CalendarPeriodEntity & CalendarPeriodEntityByCalendarIDCalendarLevelIDEndCalendarPeriodID

So in one entity class file the CalendarPeriodEntityByCalendarIDCalendarLevelIDEndCalendarPeriodID relation is defined as the relation using the StartCalendarPeriodID

And in the other file it is defined as the relation using the EndCalendarPeriodID

So most probably the Project file was altered somewhere bewteen the old and new code generations.