Hi,
I have used the hibernate 1.4.1 cartridge with the example-model from the
distribution.
For the "many" part of a 1:n relationship, there are always two foreign key
fields defined in the ddl script:
create table BOOK (
ID bigint not null,
...
primary key (ID)
);
create table PAGE (
ID bigint not null,
BOOK_TO_PAGE bigint not null,
BOOK_TO_PAGE_ITEM_ID bigint not null,
primary key (ID)
);
IMHO this is the result of inconsistent column names in the hbm.xml files.
This seems to be the same bug reported here:
http://fornax-platform.org/tracker/browse/CHB-18
which is stated to be resolved.
I removed the appending of '_ITEM_ID' from the mapping.xpt which fixed the
bug (for the non composite key case):
«DEFINE collectionKey FOR Property»
<key>
«IF ((Entity)this.class).hasCompositeId()»
...
«ELSE»«EXPAND columnElements("")»
«ENDIF»
</key>
«ENDDEFINE»
Achim
--
View this message in context:
http://www.nabble.com/-Hibernate--Duplicate-field-in-ddl-for-one-to-many-association-tp15113853s17564p15113853.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer