[hibernate-issues] [Hibernate-JIRA] Created: (HBX-914) In ManyToMany relationship don't generate @JoinTable Annotation

Nahuel E (JIRA) noreply at atlassian.com
Fri Mar 9 16:35:08 EST 2007


In ManyToMany relationship don't generate @JoinTable Annotation
---------------------------------------------------------------

         Key: HBX-914
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-914
     Project: Hibernate Tools
        Type: Bug

  Components: reverse-engineer  
    Versions: 3.2beta9    
 Environment: Eclipse 3.2, MySql
    Reporter: Nahuel E


I've 3 tables:
1) usr
2) rol
3) rxu   (relation many-to-many)

The generated sources only includes @ManyToMany annotation, so don't works.
It should include @JoinTable too, to specify the relation table name, and join columns:

    @ManyToMany(
        targetEntity=org.foo.USUARIO.class,
        cascade={CascadeType.PERSIST, CascadeType.MERGE}
    )
    @JoinTable(
        name="rxu",
        joinColumns={@JoinColumn(name="usr_id")},
        inverseJoinColumns={@JoinColumn(name="rol_id")}
    public .... getUsuarios() {
         ....
         ....
    }

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




More information about the hibernate-issues mailing list