apache / apache/grails-core

Can't refresh domain class instance from the database in statefull mode

Open
#14,389 8 comments 0 reactions 0 assignees View on GitHub
relates-to: grails-data-mongodb
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

I'm creating this issue after failing to find a solution from [Stackoverflow](https://stackoverflow.com/questions/64083488/how-to-refresh-object-from-database-unsing-gorm-for-mongodb).

Since the `refresh` method is not implemented on Gorm for Mongo and the method `get(id)` would return the same cached instance, is it possible to refresh a domain class instance from the database?

Contributor guide

Open the contributing guide

Research direction

The issue names GORM for Mongo's refresh and get methods in stateful mode, but no source files or tests. Start by reproducing the cached-instance behavior and tracing those entry points; done requires resolving whether database refresh is supported, with behavior covered by an appropriate test or documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, mongodb
Domain
backend, databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.