Recursive « Composite « JPA Q&A





1. Recursion and Composite Keys    forum.hibernate.org

Hi, I'm currently working on a project that involves reverse-engineering Hibernate mappings and model objects from an existing (and ugly) database schema. Up until now we've managed to work with the numerous composite keys but have now hit a hurdle. The basic concept is like the Employee-Manager recursive relationship you see in Database 101 tutorials. We have a table: EMPLOYEE { ...

2. Recursive one-to-many with composite-key    forum.hibernate.org

Hi I've got the following class which has a two relationships to itself. many-to-one to its parent. parent one-to-many to its children. parts This is the cfg.xml file (which was created using the Hiberate tools) Code: