[GODRIVER-358] why the spring-data-MongoDB support is not fetch all nested child records with data? Created: 11/Apr/18  Updated: 11/Apr/18  Resolved: 11/Apr/18

Status: Closed
Project: Go Driver
Component/s: Documentation
Affects Version/s: 1.0.0
Fix Version/s: None

Type: Bug Priority: Blocker - P1
Reporter: Pandiyan Rengasamy Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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);

*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



 Comments   
Comment by Rathi Gnanasekaran [ 11/Apr/18 ]

Hi. I'm sorry to hear you're having trouble, but this project is for the MongoDB Go driver.

General user questions like you have are best sent to the mongodb-user mailing list.

Generated at Thu Feb 08 08:34:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.