Can some one help me with example / idea how to deal with this scenario. I have class Animal and class Cat , that extend Animal. In Animal I have some field, also some new field in my Cat class.
So I have to create hibernate entity, that store my Cat in db and somehow to have info about parents field.
use annotation @Inherance
with
strategy=InheritanceType.ONLY_ONE_TABLE (or SINGLE_TABLE) strategy=InheritanceType.TABLE_PER_CLASS strategy=InheritanceType.JOINED
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.