Original Reporter: nugsie
Environment: MongoDB Plugin 1.0-M4, Grails 1.3.7, Java 1.6, Linux (Ubuntu 10)
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPMONGODB-24
When using list() or findAll*() methods, the plugin returns lists of named BasicDBObjects. This is inconsistent with the behaviour of the finders returning single objects which correctly return wrapped domain object instances.
This means 2 crucial things:
-
instanceOf() method isn't bound and any comparison to other domain objects (ie ones that haven't been returned as BasicDBObjects) will return false
-
The id property will not be correctly mapped as the underlying implementation is _id so it's not exposed in the BasicDBObject as 'id'
Whilst other properties are correct so for the most part it can feel as if things are functioning normally this is quite a problem.
Test case app attached to demonstrate the problem both with list() and findAll*() along with a proof that general single finders are working ok.