Associations order

0 votes
asked May 25, 2015 in Feature Request by Damien (350 points)

Hello

It would be nice to be able to order associations. The order associations appear in the mapping is important when you want to chose the columns order for a composite primary key using foreign keys

associations order

commented May 25, 2015 by ludek.vodicka Skipper developer (140,450 points)

Thanks for feature request. Can you please post here (or send it to [email protected]) example of definition skipper file together with definition files where exactly is order important? Thanks!

commented Oct 10, 2017 by MLittlewood (200 points)

I have the situation where table a contains a mandatory association to table b and an optional association to table c.
table c also has a mandatory association to table b

Because when skipper creates the yaml file, it is putting the association to table c first.
When c_id is null in table a, then the join to table b also fails because it is via table c

If I manually edit the yaml file to put the association to table b first, then the join is successful

commented Oct 10, 2017 by ludek.vodicka Skipper developer (140,450 points)

I think I understand what you need. As a quick fix, it should be sufficient to change the order of these associations in Skipper xml file. Can you please try it?

1 Answer

0 votes
answered Oct 11, 2017 by MLittlewood (200 points)

Thanks Ludek, the quick fix worked

...