MyEclipse: Foreign key constraint scaffolding - how to customise?

P0rridge - Jan 17, 2012 - 10:46 AM
Post subject: Foreign key constraint scaffolding - how to customise?
I would like to change the scolding of the Domain classes, but dont cant find where to do that in the Customisation templates.

When I put a foreign key constraint onto a InnovDB MSQL table the default scaffolding solution gives me

... 64 more
Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: c027.domain.InnovMemberDoc column: mem_doc_membership (should be mapped with insert="false" update="false")
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:676)

Google says it is something to do with the index field created being of the same name as the existing field.

To my great surprise adding the
insert="false" update="false"
to the @Joincolumns annotation does actually fixes it.

I presume this is not ME4S functionality as it requires looking at the database specifics? And ME4S does not seem to do that.

So, I created a customisation project to update the @Joincolumns annotation. But I cant find where @Joincolumns is referenced in that project. Where?

Thanks.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits