[ http://jira.andromda.org/browse/EJB-69?page=all ]

Leandro Hermida updated EJB-69:
-------------------------------

    Attachment: EntityEmbeddable.vsl.patch

> Improved JoinTable annotation for OneToMany associations in EJB3 cartridge
> --------------------------------------------------------------------------
>
>          Key: EJB-69
>          URL: http://jira.andromda.org/browse/EJB-69
>      Project: EJB Cartridge
>         Type: Improvement

>     Reporter: Leandro Hermida
>     Assignee: Vance Karimi
>     Priority: Minor
>  Attachments: EntityEmbeddable.vsl.patch
>
> Hi,
> Here is another patch to EntityEmbeddable.vsl which improves the @JoinTable 
> annotation for OneToMany associations in the EJB3 cartridge.  For the typical 
> example in UML:
> User 0..1 ---------------------> 0..* Security
> The existing EntityEmbeddable.vsl creates an annotation like this in the 
> Document.java entity bean class:
> @javax.persistence.OneToMany()
> @javax.persistence.JoinTable(name = "USER2SECURITIES")
> ...
> This is ok as a minimum but if you want to control more details of the join 
> table via JoinColumn annotations?  You can't.  And sometimes the underlying 
> persistence provider (like Hibernate) will create weird column names 
> especially if you have a given the association end a name.  So I added the 
> capability for OneToMany just like it is for the ManyToMany annotations:
> @javax.persistence.OneToMany()
> @javax.persistence.JoinTable(
>     name = "USER2SECURITIES",
>     joinColumns = [EMAIL PROTECTED](name = "USER_ID", referencedColumnName = 
> "ID")},
>     inverseJoinColumns = [EMAIL PROTECTED](name = "SECURITY_ID", 
> referencedColumnName = "ID")}
> )
> ...

-- 
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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to