Damian,
Are you certain that Castor is using your mapping file? Your xml names
are the same as the default introspection names so it may be that Castor
isn't actually using your mapping file. Make sure you are not using one
of the static marshal methods.
--Keith
[EMAIL PROTECTED] wrote:
Hi,
I am using castor 0.9.9 (previously 0.9.7 to no avail either) for runtime
mapping-file based xml binding, to and from a set of existing domain
objects. I have encountered a problem with circular dependency whereby
stack
overflow occurrs as a result of infiinte looping between the objects.
The solution to this is fairly well documented in that one side of the
relationship refere to the other as a reference via mapping file
definintion. This sounds (and should be) relatively easy, however castor
seems
to be ignoring my mapping file definition in this (and only this) respect.
From the mapping file below you can see I am sinply trying to have
Declaration reference its
declarationItem attribute as a reference; however this still generates
stack overflow.
If anyone can help with this (what should be) simple problem it would be
most appreciated.
Thanks
Damian Phillips
<?xml version="1.0" encoding="UTF-8"?>
<mapping xmlns="http://castor.exolab.org/"
xmlns:cst="http://castor.exolab.org/">
<description>Castor generated mapping file</description>
<class cst:name="package.Declaration" auto-complete="false">
<description>Default mapping for class
package.Declaration</description>
<map-to cst:xml="declaration"/>
<field cst:name="mandatory" cst:type="boolean">
<bind-xml name="mandatory" node="element" /></field>
<field cst:name="deleted" cst:type="boolean">
<bind-xml name="deleted" node="element"
transient="true"/></field>
<field cst:name="versionId" cst:type="long">
<bind-xml name="version-id" node="element"/></field>
<field cst:name="dirty" cst:type="boolean">
<bind-xml name="dirty" node="element"
transient="true"/></field>
<field cst:name="created" cst:type="boolean">
<bind-xml name="created" node="element"
transient="true"/></field>
<field cst:name="id" cst:type="java.lang.Long">
<bind-xml name="id" node="element"/></field>
<field cst:name="declarationItem"
cst:type="package.DeclarationItem">
<bind-xml name="declaration-item" reference="true"
node="attribute"/></field>
</class>
<class cst:name="package.DeclarationItem" auto-complete="false"
identity="id">
<description>Default mapping for
package.DeclarationItem</description>
<map-to cst:xml="declaration-item"/>
<field cst:name="id" cst:type="java.lang.Long">
<bind-xml node="attribute"/></field>
<field cst:name="deleted" cst:type="boolean">
<bind-xml name="deleted" node="element"
transient="true"/></field>
<field cst:name="versionId" cst:type="long">
<bind-xml name="version-id" node="element"/></field>
<field cst:name="dirty" cst:type="boolean">
<bind-xml name="dirty" node="element"
transient="true"/></field>
<field cst:name="created" cst:type="boolean">
<bind-xml name="created" node="element"
transient="true"/></field>
<field cst:name="declarationText" cst:type="java.lang.String">
<bind-xml name="declaration-text"
node="element"/></field>
<field cst:name="declarations" cst:type="package.Declaration"
collection="collection">
<bind-xml name="declarations" node="element"/>
</field>
</class>
</mapping>
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------