How to configure Hibernate database reverse engineering tool to map database table relation as a ent

Posted by Piotr Kochanski on Stack Overflow See other posts from Stack Overflow or by Piotr Kochanski
Published on 2010-04-30T11:55:43Z Indexed on 2010/04/30 11:57 UTC
Read the original article Hit count: 242

Is it possible to configure Hibernate reverse engineering and code generation tool in such a way that one-to-many relation between tables is mapped to entities inheritance instead of enrites relation?

I have Person table and Employee table, which are related with the foreign key (Person contains basic information, Employee the rest). In my Java code I would like this relation mapped to inheritance Employee extends Person.

This can be done by hand, but maybe I missed some custom configuration parameter that I can use.

I couldn't find any official documentation - docs link on RedHat Hibernate page (http://www.hibernate.org/5.html#A10) is broken...

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about reverse-engineering