@JoinColumn and mappedBy have nothing to do with eachother! 

If you have a bidirectional relation you should always inform Hibernate about 
this by (normally) adding mappedBy on the Collection side. If you don't you 
might generate unnecessary tables and cause double SQL to be generated

@JoinColumn is optional - as used above only to customize name of column. A 
good practice is to also set the JPA attribute nullable=false instead of 
Hibernate's @NotNull

/Jens

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111941#4111941

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111941
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to