Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Embedded Elements in ORM Mapping

PLC_David

2008-09-17

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi,

I used OpenJPA because I can't realized the mapping with annotations.
So I use the orm.xml for my mapping.

Now my Problem: I have an other class in my entity which contains an other
class.
But I can't found the embedded element in an embedded element into
orm_1_0.xsd.

How I can write this mapping in the orm.xml ?


RootClass {

int id
Subclass sub
...
}


Subclass {

Subsubclass subsub
...
}

Subsubclass {

basic types like int and string
}

my wrong orm.xml which not work:

<entity class="RootClass">
   <attributes>
     <embedded name="sub" />
   </attributes>
</entity>

<embeddable class="Subclass">
   <attributes>
     <embedded name="subsub" />         <--- this is not accept with
the xsd
   </attributes>
</entity>
 
<embeddable class="Subsubclass">
   <attribute>
       < ...>
  </attribute>
</embeddable>


So I hope anybody can help me.
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.