Skip to content

GPMONGODB-363: Changing a string collection attribute does not result in an update #296

@graemerocher

Description

@graemerocher

Original Reporter: msmolyak
Environment: Various flavors of UNIX
Version: 1.3.3
Migrated From: http://jira.grails.org/browse/GPMONGODB-363

I have a domain object, to which I recently added a new attribute of type List. Until the addition the Grails application using the MongoDB plugin was working correctly. With the new attribute, changing its value (by adding another string) and calling save() on the domain object does not result in MongoDB update. This resembles the issue described here:

http://grails.1312388.n4.nabble.com/n00b-Question-GORM-for-Mongo-entity-update-issue-td4023126.html

To work around this bug, I had to introduce another attribute, of type int, which gets incremented each time I change the string collection. When both attributes are updated (the list of strings and the integer), the update proceeds correctly (changing both values in the database).

Apparently "dirty" checking is not working when a string collection attribute is changed alone.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions