You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2006/04/18 16:18:16 UTC
XMLDecoder question
Kevin,
I am trying to use XMLDecoder to process JPA ORM mapping. I got stuck
with Collection decoding. My model looks like this:
<model>
<entity name="org.objectstyle.cayenne.jpa.map.JpaEntityMappingsInfo"
xmlTag="entity-mappings">
<property name="entities" xmlTag="entity" forceList="YES"/>
</entity>
<entity name="org.objectstyle.cayenne.jpa.map.JpaEntity"
xmlTag="entity">
<property name="name" xmlTag="name"/>
</entity>
</model>
Test file is this:
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm/orm_1_0.xsd">
<entity
class="org.objectstyle.cayenne.jpa.persistent.MockPersistent1"/>
<entity
class="org.objectstyle.cayenne.jpa.persistent.MockPersistent2"/>
</entity-mappings>
What I want to get is a JpaEntityMappingsInfo with a collection of
two JpaEntities. Instead I get an empty JpaEntityMappingsInfo. All
this code is in CVS.
Any ideas?
Andrus