Hi,

I have some problems to implement a working mapping
for some of my objects.
In fact, an object X has a List of references to
object Y instances.
These Y object instances are themselves references in
another previously defined object A :

So, to summarize I have :

class A {
  List list_Y;
  X objectX;
}
class Y {
  String identifier;
  String value;
}
class X {
  List list_Y; /* contains EXISTING instances also
referenced in A */
}

So, from here I would like to create a mapping that
generates such an xml structure :

<root
<A>
  <ListOfY>
    <Y id="123" value="first instance of Y"/>
    <Y id="456" value="second instance of Y"/>
    <Y id="789" value="third instance of Y"/>
  </ListOfY>
  <X>
    <ListOfY>
      <Y refid="123"/>
      <Y refid="789"/>
    <ListOfY>
  </X>
</A>


How can I achieve this with a JiBX binding ???
I have tried many binding configs (with the
ident="def" / ident="ref") and could not get a correct
result.

The 'best' result I had consisted of Y elements which
were duplicated (separate instances but with same
property values ==> not references).

Thanks in advance for your help / suggestions.

OzB.




        
                
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to