I have master record named Offer with an ID. I have a detail record named Offer_Cost with a composite key consisting of the Offer ID and a date. I would like to create the association between Offer and Offer_Cost (ONE_TO_MANY).
I can’t figure out how to enter the Association into Studio, since the Offer ID is already part of the Embedded key. When I create a separate field for the Association, I end up with the error “Multiple writable mappings exist for the field [OFFER_COST.OFFER_ID]. Only one may be defined as writable, all others must be read-only”. I guess I could go into the Java and add “updatable=false, insertable=false” to get a read-only field, but is this the best way to handle the problem?
Is there a best practice for specifying an association that is part of a composite(embedded) key?