[NOTICE] 3.5-SNAPSHOT and 3.5.8

1 post / 0 new
vvandens
Offline
Joined: 05/29/2008
[NOTICE] 3.5-SNAPSHOT and 3.5.8

To all 3.5-SNAPSHOT and (future) 3.5.8 users,

We have changed the way bidirectional 1-1 and n-n relationships get mapped in the DB - see http://www.jspresso.org/mantis/view.php?id=390 .

A bi-directional 1-1 relationship is conceptually perfectly symmetric. However it is mapped as a 1-n relationship (using a foreign key column) with a unique constraint enforced on the foreign key column. One side of the relationship has to be "elected" as the "leading" side, i.e. the one holding the fk. Since there was no way to tell Jspresso which one it is, the generator compares alphabetically the 2 table names (and the 2 property names if it is a reflexive relationship) to "elect" the leading end.

From now on, the leading end will be the (1st) side that is explicitly assigned with a reverse property. This rule might imply a change on which side is assigned the "reverse" end in order to keep an existing schema during version migration. Note that this does not change model conceptual design at all.

 

Regards,

Vincent