[jboss-user] [JBoss Seam] - Re: Could not synchronize database state with session

jensaug do-not-reply at jboss.com
Tue Dec 11 08:52:54 EST 2007


@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



More information about the jboss-user mailing list