Have you checked whether the correct foreign keys are in place in the database? 
If not, have you tried to drop the tables and allow Hibernate (which I assume 
you're using) to generate the tables again?

On a side note, a few non related tips for you:

1. You don't need an explicit constructor if the sole constructor is public and 
has no arguments. Calling super() is useless if the class only extends 
java.lang.Object.
2. When defining relationships, you don't need to specify targetEntity when 
using generics.
3. You don't EVER have to specify strategy = GenerationType.AUTO, since it's 
the default anyway. 
4. Always use English for variable and method names. Makes your software more 
consistent and maintainable.

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

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

Reply via email to