5 Replies Latest reply on Sep 26, 2011 8:48 AM by Peter551059

    Data service (DB adapter) returns XML with missing collection's content

    Peter551059
      Hello.
      I am facing problem with DB adapter connected to MySQL database.
      When I use select from 1-2 tables (connected by master-detail relationship) adapter works fine.
      When I use more than 2 tables adapter returns only master table and empty detail collections.

      This is example of 2 tables (master-detail) response
      <BasketItemCollection>
      <BasketItem>
      <basketItemId>234</basketItemId>
      <loggedUserId>126</loggedUserId>
      <itemTitle>itemTitle</itemTitle>
      <itemPartNo/>
      <itemPrice>301.26</itemPrice>
      <itemVat>0.0</itemVat>
      <itemQty>1</itemQty>
      <itemNote/>
      <dateInsert>2009-10-08T16:07:30.000+02:00</dateInsert>
      <basketInvoiceId>44</basketInvoiceId>
      <documents>
      <docId>560</docId>
      <dateCreated>2011-08-23T09:14:52.000+02:00</dateCreated>
      <available>false</available>
      <passwordProtected xsi:nil="true"/>
      </documents>
      </BasketItem>
      </BasketItemCollection>

      This is example of response after adding 1 master table
      <BasketInvoiceCollection>
      <BasketInvoice>
      <basketInvoiceId>44</basketInvoiceId>
      <browserId>371</browserId>
      <loggedUserId>126</loggedUserId>
      <createDate>2009-10-08T16:08:17.000+02:00</createDate>
      <statusId>7</statusId>
      <deliveryCompany xsi:nil="true"/>
      <deliveryName>Alena Molnarova</deliveryName>
      <deliveryStreet>fgh</deliveryStreet>
      <deliveryCity>fgh</deliveryCity>
      <deliveryZip>9054</deliveryZip>
      <deliveryCountry>fghfgh</deliveryCountry>
      <internalInvoiceId xsi:nil="true"/>
      <userNote>fghfgh</userNote>
      <userLng>sk</userLng>
      <paymentMethod>cash_on_delivery</paymentMethod>
      <deliveryMethod>Prevzatie tovaru osobne</deliveryMethod>
      <htmlCode xsi:nil="true"/>
      <currency>skk</currency>
      <basketItemCollection/>
      </BasketInvoice>
      </BasketInvoiceCollection>

      basketItemCollection is here empty.
      Where can be a problem hidden?

      Thanks in advance for any help