Sorry missde that annotation. But your problem is quite simple. You are using "idruta" as part of the pk and as fk. Regards Felix View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042964#4042964 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042964