I have a series of POJO classes that are mapped with Hibernate Annotations to my database.
For testing, I wanted to create default classes that extend my POJO classes, providing minimal data to meet the various check constraints on the database.
Is there any way to extend a Hibernate annotated class without mapping the subclass?
I could map them, define the inheritance as a table per subclass and insert dummy tables with the primary key, but I'd prefer not adding annotations to the original POJO for the test classes, nor adding to my schema when testing.
The only alternative I've come up with is to define static construction methods, but this wont let me add fields or override methods.
|