Hi,

I have a big problem with TABLE_PER_CLASS mapping...I want map each concrete
classes in my class hierarchy to a separate table (in accordance with
JSR-200 page 39 - Table per Concrete Class Strategy)

When I use OpenJPA as provider, I have the following behavior :

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
abstract class RootClass { // persistent properties}

@Entity
@Table(name="BAR_TABLE")
class Bar extends RootClass {...}

@Entity
abstract AbstractFoo extends RootClass { // extra attributes }

@Entity
@Table(name="FOO1_TABLE")
class Foo1 extends AbstractFoo {...}

@Entity
@Table(name="FOO2_TABLE")
class Foo2 extends AbstractFoo {...}

The image below helps to visualize my problem:

http://n2.nabble.com/file/n2828426/tpc_issue_openjpa2.png 

If I use Hibernate as provider this works fine.

Does anyone know why?

I use openjpa-1.2.0.

-- 
View this message in context: 
http://n2.nabble.com/TABLE_PER_CLASS-does-not-work-as-described-in-JSR-200-%28JPA-1.0%29-tp2828426p2828426.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to