MorphiaOrg / MorphiaOrg/morphia
Override isStoreNulls in PropertyAnnotation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 449
- Avg merge
- 7m
- Merged PRs (30d)
- 10
Description
Sometimes it can be useful to store a null value. While 99% of the time I don't, there are several times I want to null something out. It would be useful to have a field which can store/not store nulls overriding the default value of the mapper option
@Property(storeNull = true) String name;
@Property(storeNull = false) lateinit var name:String
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
Start by tracing PropertyAnnotation and the mapper option that controls null storage. Determine where property-level annotation values are read and how they affect persistence, then verify that both store-null and do-not-store-null overrides work without changing the default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin, mongodb
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100