Skip to content

GPMONGODB-161: criteria 'in' not working for references #247

@graemerocher

Description

@graemerocher

Original Reporter: gruby_karol
Environment: ubuntu 11.10 64bit, grails 2.0.0, mongo 1.0.0.RC3
Version: 1.0.0.RC2
Migrated From: http://jira.grails.org/browse/GPMONGODB-161

I query the domain class:
{code}
class Game {
static mapWith = "mongo"
DictItem gameState

String title
String black
String white

{code}
where DictItem is another domain class.

{code}
def gameList = Game.withCriteria {
def user = playerNick
def stateList = DictItem.findAllByDictionaryAndSymbolNotEqual(DictDefinition.findBySymbol("GAME_STATE"), "GAME_STATE_FINISHED")
or {
eq("black", user)
eq("white", user)
}
'in'("gameState", stateList)
}
}
{code}

No mather the actual data, 'in' produces empty result set.

If I change the data structure so the stateList is a list of Strings, 'in' condition works fine.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions