XMLDecoder question

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Apr 18 2006 - 10:18:16 EDT

  • Next message: Andrus Adamchik: "Re: documentation"

    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



    This archive was generated by hypermail 2.0.0 : Tue Apr 18 2006 - 10:18:42 EDT