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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira