java - Hibernate Entity Inheritance between Tables and Views -


i have 2 tables , view. tablea has fields. tableahistory has same fields tablea. viewall union of tablea , tableahistory, additionally has field called "current_vers" denotes current version ('y' tablea rows , 'n' tableahistory rows).

it seems should able take existing hibernate entity bean tablea , extend create view viewall. when this, however, errors regarding dtype column don't have.

how should this?

edit: need able query view, have results tablea beans.

it looks trying create audit trail. answer based on assumption.

the best hibernate approved solution use hibernate envers. allows fine grained control of fields audit , strong versioning implementation works across relationships , inheritance boundaries. envers has apis support accessing prior versions see changes, timestamp, version etc.

if still have flexibility in adding this, suggest using envers.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -