spring data mongodb "id" field mapping -
i have document array field with
"chapters": [ { "id" : "14031871223912313", ...} ... ]
i query return id's spring data's mongotemplate using following:
class chapter { private string id; public string getid() { return id; } }
this way id not populated. have tried using different mapping options @field described here http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mapping.conventions.id-field
what doing wrong? know can mongo java driver, thought should work.
thanks in advance help.
found solution. populated via:
@field("id") private string chaperid
Comments
Post a Comment