#6 EntityInitialDataSet not working properly w. SINGLE_TABLE...

v1.0 (example)
open
nobody
None
5
2007-10-22
2007-10-22
Anonymous
No

EntityInitialDataSet doesn't work properly with SINGLE_TABLE inheritance.

[damned short Summary]

If my BaseSessionBeanFixture subclass provides an EntityInitialDataSet using an entity class hierarchy declared as SINGLE_TABLE inheritance, the cleanup() method fails, since it want's to delete data from non existing tables.

The causing behaviour is connected to the EntityBeanIntrospector. If EntityBeanIntrospector is constructed with an entity bean class, which is a subclass of another entity bean class annotated with @Table and declared as SINGLE_TABLE inheritance, the table name of the first bean class is constructed using the default table name rule (same as class). So the EntityInitialDataSet try's to delete all data from a non existing table, as the entity subclass is used to be written into the table declared in the upper @Table annotation. Furthermore, the simple cleanup behaviour doesn't seem to work with SINGLE_TABLE inheritance in general.

Jonny Newald

Discussion