Skip to content

GPMONGODB-6: first level session cache lookups fail when using String IDs instead of org.bson.types.ObjectId #468

@graemerocher

Description

@graemerocher

Original Reporter: dan_lynn
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPMONGODB-6

To reproduce, create a domain class, use a String for the id field and run-app. Calls to instance.getDbo() will return null since the AbstractSession.firstLevelEntryCache map uses org.bson.types.ObjectId for its keys.

{code}
class MyController {

def lookup {
    def person = Person.findByName('Fred')
    assert person.getDbo()  // fails
}

}
{code}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions