MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
P0rridge
Post subject: Foreign key constraint scaffolding - how to customise?  PostPosted: Jan 17, 2012 - 10:46 AM
Registered Member
Registered Member


Joined: Jun 20, 2010
Posts: 143

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.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits