Hi all, I am having problems mapping two relations among tables. I am using EJB3, so standard java persistence.
1) First relation definition. The idea here is that a category may belongs to many categories. A many to many relation but with itself. CATEGORY | * ID | * DESCRIPTION | * more properties | | PARENT_CATEGORY | * CATEGORY_ID (FK) (foraign with id in table category) | * PARENT_ID (FK) (foraign with id in table category) | no more properties 2) Second relation definition. It is a simple many to many relation between CATEGORY and LOCALE but the table CATEGORY_LOCALE has more properties. Mayby I might write a CategoryLocaleEntity with a composite primary key but this composite key should be a composition of id in CATEGORY and id in LOCALE. CATEGORY | * ID | * DESCRIPTION | * more properties | | LOCALE | * ID | * more properties | | CATEGORY_LOCALE | * category_id (FK) (foraign with id in table category) | * locale_id (FK) (foraign with id in table locale) | * more properties Thank you in advance. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103503#4103503 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103503 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
