You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Ofir Tam <to...@bgu.ac.il> on 2009/06/28 14:23:13 UTC
Embedding a MappedSuperClass in another MappedSuperClass
hi,
I have a problem embedding a MappedSuperClass in another MappedSuperClass.
I want my entity to have it's super class member (which is abstract).
I get some null pointer exception in
org.apache.openjpa.kernel.BrokerImpl.embed(BrokerImpl.java:2681)
I have openjpa-1.2.1
I was wondering how can I achieve this structure:
@MappedSuperClass
abstract BaseClass1 {
@Embeded
BaseClass2 member;
}
@MappedSuperClass
abstract BaseClass2{
@Base
Something
}
@Entity
Class1 extends BaseClass1
@Embedable
Class2 extends BaseClass2
Re: Embedding a MappedSuperClass in another MappedSuperClass
Posted by Rick Curtis <cu...@gmail.com>.
I'm running on trunk and I wasn't able to recreate the problem. Can you try
running on trunk to see if the problem exists only on the 1.2.1 branch? If
you can't get it working on trunk, please post a more thorough example of
the scenario that you are running into the problem with. A full stack trace
would be nice to see also.
-Rick
letme wrote:
>
> hi,
> I have a problem embedding a MappedSuperClass in another MappedSuperClass.
> I want my entity to have it's super class member (which is abstract).
> I get some null pointer exception in
> org.apache.openjpa.kernel.BrokerImpl.embed(BrokerImpl.java:2681)
> I have openjpa-1.2.1
> I was wondering how can I achieve this structure:
>
> @MappedSuperClass
> abstract BaseClass1 {
> @Embeded
> BaseClass2 member;
> }
>
> @MappedSuperClass
> abstract BaseClass2{
> @Base
> Something
> }
>
> @Entity
> Class1 extends BaseClass1
>
> @Embedable
> Class2 extends BaseClass2
>
>
--
View this message in context: http://n2.nabble.com/Embedding-a-MappedSuperClass-in-another-MappedSuperClass-tp3169798p3177164.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.