• 1 reply
  • Latest Post - ‏2013-02-26T17:00:10Z by
4179 Posts

Pinned topic Populating a recursive complex type.

‏2013-02-26T15:38:29Z |
I have an complex type like the following:

<xsd:complexType name="watereddownFacility">
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element minOccurs="0" name="parentFacility" type="tns:watereddownFacility"/>

I want to populate this object in my MB esql code but I don't know how many desendents there are.I get a list of facilties with its parents as input and I need to populate my complex type from it.

How would I go about creating the watereddownFacility object and then setting each parent inside itself until the root parent is reached ?

Thanx for your help.
Updated on 2013-02-26T17:00:10Z at 2013-02-26T17:00:10Z by
    515 Posts

    Re: Populating a recursive complex type.

    I cannot work out what you are asking. What part of the problem are you struggling with? The algorithm for translating a flat list into a recursive tree structure? Or the ESQL/Mapping node/Java code that implements such an algorithm?
    Have you tried anything yet? If so, what happened?