Skip to content

Query on nested id field incorrectly returns no results [DATAMONGO-2221] #3059

Closed
@spring-projects-issues

Description

@spring-projects-issues

Joseph Blair opened DATAMONGO-2221 and commented

I previously reported this issue in DATAMONGO-2193.  Upgrading to 2.1.5 fixed the issue I reported in that ticket, however, it has reappeared in a different (but similar) use case.  The behavior is the same, where it appears that the driver is submitting my query value as an ObjectId instead of a regular string.  This is confirmed by the fact that changing the value in the database to an ObjectId causes it to be returned by the same query.

I'm at a loss as to why the two cases are behaving differently since they are annotated the same way.  My only guess is that this new case is doubly nested, rather than singly nested (eg, recipient.id versus trigger.assignee.id).

I commented this on the old ticket, but couldn't find a way to reopen it, so I submitted this one.  Let me know if it's easier to work off the old ticket instead, or if there's any additional information I can provide that would be useful.  Thanks


Affects: 2.1.5 (Lovelace SR5)

Referenced from: pull request #732

Backported to: 2.1.6 (Lovelace SR6)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions