Closed
Description
Tomasz Nurkiewicz opened DATAMONGO-1902 and commented
Having the following classes:
@Document
class Parent {
int id;
Child child;
}
class Child {
String name;
}
Spring Data always produces the following document:
{
"id": 1,
"child": {
"name": "Foo"
}
}
It would be nice to have an annotation like @Embeddable
so that the document looks like this:
{
"id": 1,
"name": "Foo"
}
NB: what about naming conflicts if both Parent
and Child
contain the same field
Issue Links:
- DATACMNS-1699 Add support for
@Embedded
value objects
Referenced from: pull request #896
1 votes, 2 watchers