Details
Description
This works in Beta3a:
<binding>
<mapping name="DbObject" class="edu.iris.dmc.db.DbObject"
abstract="true" >
<structure name="DbInfo" label="dbFields"
value-style="attribute" >
<value name="enteredOn" field="enteredOn" />
<value name="enteredBy" field="enteredBy" />
<value name="modifiedOn" field="modifiedOn" />
<value name="modifiedBy" field="modifiedBy" usage="optional" />
</structure>
</mapping>
<mapping name="Station" class="edu.iris.dmc.isis.Station"
value-style="attribute" >
<value name="siteName" field="siteName" />
<value name="stationCode" field="code" />
[stuff cut out for brevity]
<structure name="DbInfo" using="dbFields" />
</mapping>
</binding>
But in Beta3b, I get the following bind-time exception:
[bind] org.jibx.runtime.JiBXException: Reference to structure dbFields has object of type edu.iris.dmc.isis.Station rather than required java.util.Date
[bind] at org.jibx.binding.def.StructureReference.setLinkages(StructureReference.java:120)
[bind] at org.jibx.binding.def.ElementWrapper.setLinkages(ElementWrapper.java:443)
[bind] at org.jibx.binding.def.NestedStructure.setLinkages(NestedStructure.java:236)
[bind] at org.jibx.binding.def.PassThroughComponent.setLinkages(PassThroughComponent.java:140)
[bind] at org.jibx.binding.def.ObjectBinding.setLinkages(ObjectBinding.java:752)
[bind] at org.jibx.binding.def.ElementWrapper.setLinkages(ElementWrapper.java:443)
[bind] at org.jibx.binding.def.MappingDefinition.setLinkages(MappingDefinition.java:678)
[bind] at org.jibx.binding.def.DefinitionContext.setLinkages(DefinitionContext.java:624)
[bind] at org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:524)
[bind] at org.jibx.binding.Compile.compile(Compile.java:283)
[bind] at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:238)
[I admit that this is problably not the best way to do this particular mapping, but the issue remains...]