Skip to content

GPMONGODB-406 nested criteria produces wrong query #14664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kpaxton opened this issue Jun 16, 2015 · 0 comments
Open

GPMONGODB-406 nested criteria produces wrong query #14664

kpaxton opened this issue Jun 16, 2015 · 0 comments

Comments

@kpaxton
Copy link

kpaxton commented Jun 16, 2015

when building a criteria like below the mongo query that gets created is incorrect. the 'or' is ignored completely

def criteria = Class.createCriteria() criteria.list(){ eq("field1", "value1") field2{ isNull("subfield2") } or { field2{ 'in'("subfield2.subsubfield", list) } eq("field3","value3") } }
produces:
{ "$and":[ {"field1":"value1"} {"field2.subfield2":null} {"field2.subfield2.subsubfield":{"$in":["val1","val2","val3","val4"]}} {"field3":"value3"} ] }

jamesfredley referenced this issue in apache/grails-data-mapping Mar 8, 2025
… v3.1 (#539)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jamesfredley referenced this issue in apache/grails-data-mapping Mar 13, 2025
…urrent tenant id (#539)

* Multi-tenant issue fix. The list method with parameters is not resolving the current tenant id

See https://github.com/grails/gorm-hibernate5/issues/537

* More tests for first, last and findAll, with the same issue with max parameter
@jdaugherty jdaugherty transferred this issue from apache/grails-data-mapping Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants