Migration v2->v3 : Fields position changed!

Posts   
 
    
kal
User
Posts: 18
Joined: 25-May-2010
# Posted on: 30-Nov-2010 18:00:44   

Hi folks!

I have migrated from LLBLGen v2.0 to v3.0. Everything runs fine, except that fields position have changed in some table.

It seems that fields are now sorted alphabetically, at least for primary keys. It's an issue for me, as every entity instantiation in my code have to be reviewed, to change argument order in constructor.

For exemple, this instantiation is no longer correct :


PARAMETRE_TOP1Entity top1 = new PARAMETRE_TOP1Entity(dateDebut, dateFin, codeRegroupement, sProfilGRD, typeEngagement, typePrix);

With LLBLGen v3, it has to be :

PARAMETRE_TOP1Entity top1 = new PARAMETRE_TOP1Entity(dateDebut, dateFin, sProfilGRD, codeRegroupement, typeEngagement, typePrix);

Do you have a solution to maintain old position order?

Thank you!

Kal

kal
User
Posts: 18
Joined: 25-May-2010
# Posted on: 30-Nov-2010 18:10:21   

It looks like a breaking change of LLBLGen v3, according to the ChangeLog. I'm gonna check all my code then flushed

Cheers, Kal

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 30-Nov-2010 21:12:44   

Correct, this is an unfortunate breaking change for V3. It has been discussed at some length on the forum, and it is pretty much guaranteed that we will not be reverting to the 2.6 system.

So yep, checking all of your code is the way to go.

Matt

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 01-Dec-2010 10:51:44   

In v3.1, we'll add a feature which allows you to order the fields to your liking. This isn't completely as v2.6, as with multiple db targets, keeping things in sync with both db's could be impossible (e.g. when the target tables have different ordering of the fields).

If you want to know for which entities this problem pops up, you can use element search in the designer and use this code: http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=104475&ThreadID=18633

Frans Bouma | Lead developer LLBLGen Pro
kal
User
Posts: 18
Joined: 25-May-2010
# Posted on: 01-Dec-2010 11:40:12   

Otis wrote:

In v3.1, we'll add a feature which allows you to order the fields to your liking. This isn't completely as v2.6, as with multiple db targets, keeping things in sync with both db's could be impossible (e.g. when the target tables have different ordering of the fields).

If you want to know for which entities this problem pops up, you can use element search in the designer and use this code: http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=104475&ThreadID=18633

That's a nice feature! smile

Thanks for your answer! Cheers