I have a weird behavior here with Spring Boot Mong...
# server
f
I have a weird behavior here with Spring Boot MongoDb. This document:
Copy code
@Document(collection = "schedules")
data class ScheduleDocument(val payload: Payload) {
}
is stored as:
Copy code
{
  "_id" : ObjectId("5a636f2e5017622fc0c4654a"),
  "_class" : "example.Payload",
  "channel" : "push",
  "schedule" : ISODate("2018-01-20T16:32:46.535Z")
}
But I was expecting
payload
to be a subdocument, like this:
Copy code
{
  "_id" : ObjectId("5a636f2e5017622fc0c4654a"),
  "_class" : "example.ScheduleDocument",
  "payload": {
    "channel" : "push",
    "schedule" : ISODate("2018-01-20T16:32:46.535Z")
  }
}
can anyone explain this behavior?
n
#spring?