Skip to content
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

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

Closed
graemerocher opened this issue Mar 24, 2014 · 0 comments

Comments

@graemerocher
Copy link
Member

Original Reporter: msmolyak
Environment: Various flavors of UNIX
Version: 1.3.3
Migrated From: http:https://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:https://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.

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

1 participant