Entity construct functions and relations are changed when upgrade to v3.0

Posts   
 
    
Leo Wang
User
Posts: 29
Joined: 29-Jul-2010
# Posted on: 04-Nov-2010 02:34:19   

We upgrade lgp file from v1.0 to v2.6 and then to v3.0 but after we generated codes from v3.0, we found Entity construct functions and relations are changed. So we have to update all related codes

Entity construct function from


new BenefitEntity(periodid, carrierid, benefitId)

to


new BenefitEntity(carrierid, periodid, benefitId)

Relations from


bucket.Relations.Add(CarrierBannerAdEntity.Relations.SponsorshipAdEntityUsingPeriodIDCarrierID, JoinHint.Left);

to


bucket.Relations.Add(CarrierBannerAdEntity.Relations.SponsorshipAdEntityUsingCarrierIDPeriodiD, JoinHint.Left);

Question: Is there any way to avoid updating related codes? Any change/setting needed in llblgenv3.0 designer?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 04-Nov-2010 07:00:32   

Leo wrote:

Question: Is there any way to avoid updating related codes? Any change/setting needed in llblgenv3.0 designer?

Indeed, that is a breaking change in v3. You have to change your code to meet this change in the field order. This is unavoidable. The good new is that you have to do this just once, this ordering behavior will remain in all future LLBLGen version.

As I said before, VS.Net find/replace + regex could saves you some time.

David Elizondo | LLBLGen Support Team