micronaut-projects / micronaut-projects/micronaut-data

Cannot use criteria API with MongoDB when field is an embedded collection

Open
#2,934 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Java
Stars
482
Forks
229
Avg merge
1d 7h
Merged PRs (30d)
32

Description

Expected Behavior

Everything is described in this discussion

Actual Behaviour

Using a @Relation(Relation.Kind.EMBEDDED) on a List field throws an error that List is not annotated with @Embeddable.

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

4.4.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked discussion #2130 and reproducing the Criteria API failure with a MongoDB entity that uses @Relation(Relation.Kind.EMBEDDED) on a List field. Trace the handling that reports List is not annotated with @Embeddable. Done means the embedded collection can be used through the Criteria API without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mongodb
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.