EJB3: EmbeddedValue: Generate Associations
------------------------------------------

         Key: EJB-32
         URL: http://jira.andromda.org/browse/EJB-32
     Project: EJB Cartridge
        Type: Improvement

 Environment: Andromda-3.2, EJB3
    Reporter: Torsten Lunze
 Assigned to: Vance Karimi 


A EmbeddedValue can have associations which should be generated to. For example 
you can have a Currency (defining Dollar, Euro ...) and CurrencyValue having a 
Currency and an amount. In CurrencyValue you would need the following:

@OneToOne
@JoinColumn(name="CURRENCY_CODE")
public Currency getCurrency() {
        return currency;
}

(I think only unidirectional OneToOne association make sense here)

Then you also have to override the foreign key in the Entity you will embedded 
the currency value (<- I will provided a patch for this)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply via email to