why the spring-data-MongoDB support is not fetch all nested child records with data?

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: CRUD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I have MongoDB Collection like follow

      MongoDB JSON:

      {
      "_id" : "1",
      "_class" : "com.AColl",
      "BColDate" :

      { "BName" : "xx", "BFirstName" : "97908", "BList" : [] }

      ,
      "CCollList" : [
      {
      "CId" : "1",
      "Cname" : "abc"
      "CList" : [

      { "S" : "N", "Value1" : "", "Val2" : "qq", "Val3" : "ww1" }

      ],
      "addres1" : "",
      "status" : false
      },
      {
      "CId" : "2",
      "Cname" : "abc"
      "CList" : [

      { "S" : "N", "Value1" : "", "Val2" : "qq", "Val3" : "ww1" }

      ],
      "addres1" : "",
      "status" : false
      },
      {
      "CId" : "3",
      "Cname" : "abc"
      "CList" : [

      { "S" : "N", "Value1" : "", "Val2" : "qq", "Val3" : "ww1" }

      ],
      "addres1" : "",
      "status" : false
      }
      ]
      }

      Java PoJo:

      @Document(collection="test")
      class Test implements Serializable

      { private static final long serialVersionUID = 1L; @Id @Indexed private String id; @Field("bbcoll") private BColl bbcoll; @Field("CCollList") private List<CCollList> CCollList; }

      class BColl implements Serializable

      { private String BName; private String BFirstName; private List<BList> bList; }

      class CCollList implements Serializable

      { private String CId; private String CName; private List<CList> bList; }

      class CList implements Serializable

      { private String S; private String Value1; private String Value2; private String Value3; }

      Java Code - Spring Data MongoDB query:

      Test col = mongoOperation.findOne(query, Test.class);

      MongoDB Response:

      {
      "_id" : "1",
      "_class" : "com.AColl",
      "BColDate" :

      { "BName" : "xx", "BFirstName" : "97908", "BList" : [] }

      ,
      "CCollList" : [
      {
      "CId" : "1",
      "Cname" : "abc"
      "CList" : [

      { "S" : "N", "Value1" : "", "Val2" : "qq", "Val3" : "ww1" }

      ],
      "addres1" : "",
      "status" : false
      },
      {
      "CId" : "2",
      "Cname" : "abc"
      "CList" : [

      { "S" : null, "Value1" : null, "Val2" : null, "Val3" : null }

      ],
      "addres1" : "",
      "status" : false
      },
      {
      "CId" : "3",
      "Cname" : "abc"
      "CList" : [

      { "S" : null, "Value1" : null, "Val2" : null, "Val3" : null }

      ],
      "addres1" : "",
      "status" : false
      }
      ]
      }

      Query:

      When I try to iterate the CList object value for the "Cid" =2/3/1 and the MongoDB collections list values are null but in MongoDB the values are existed (as per json) and list object are not null.

      **Why this issue in spring-date-mongoDB (version 1.9)?
      otherwise, please let me know that this issue identified earlier?**

      I really appreciate your help.

      Thanks and Regards,
      Pandiyan Rengasamy

            Assignee:
            Unassigned
            Reporter:
            Pandiyan Rengasamy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: