Skip to content

Support flattening embedded/nested objects [DATAMONGO-1902] #2803

@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: pull request #896

1 votes, 2 watchers

Metadata

Metadata

Labels

in: mappingMapping and conversion infrastructuretype: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions