Thanks for your post. After you synchronized the Entity Relationship Diagram (ERD) to class diagram, you can open Specification dialog of the association, switch to ORM Association Detail tab to check Read only (as attached image). Then you will get update=“false” insert=“false” generated in the mapping file. If there is any further inquiry, please feel free to contact me.
The problem with selecting the “read only” checkbox is that DBVA does not generate any setter function (which a user might manually use to create an association between the two objects.
Thanks for replying. In this case, you need to have Primary Key which is also a Foreign Key, then select “key-property” for Composite ID with Association in Advanced Settings when generate code (please see attached image). Then you can generate update=“false” insert=“false” in the mapping file.
Please feel free to ask if you have any further question.
Error creating bean with name ‘cxpay-offerSessionFactory’ defined in class path resource [config/cxpay-offerDaoContextTest.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Repeated column in mapping for entity: com.chordiant.cxpay.offer.businessobject.internal.CxPayCodeValue column: LISTCODE (should be mapped with insert=“false” update=“false”)