facebook

Foreign key constraint scaffolding – how to customise?

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #322401 Reply

    Greg Soulsby
    Member

    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.

Viewing 1 post (of 1 total)
Reply To: Foreign key constraint scaffolding – how to customise?

You must be logged in to post in the forum log in