MorphiaOrg / MorphiaOrg/morphia
Mapping nested objects to property using dot notation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 449
- Avg merge
- 7m
- Merged PRs (30d)
- 10
Description
Hello,
This is a feature request.
When mapping documents to POJO's, it would be nice to use the @Property annotation to map nested documents using dot notation. For example;
Document
{
name: "morphia",
meta: {
version: "1.1.1"
}
}
POJO
class Document {
private String name;
@Property("meta.version")
private String version;
}
This would avoid having to model deeply nested documents with a lot of boilerplate code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the @Property mapping implementation and existing nested-document mapping behavior, then determine where dot-notation paths are resolved. Done means a POJO field annotated with @Property("meta.version") receives the nested document value without requiring an intermediate model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mongodb
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100