开发者

Is it possible to configure Grails to never change a domain object unless .save() is called?

开发者 https://www.devze.com 2023-02-12 06:30 出处:网络
Is it possible to configur开发者_如何转开发e Grails to that changes to domain objects are never persisted unless .save() is explicitly called?

Is it possible to configur开发者_如何转开发e Grails to that changes to domain objects are never persisted unless .save() is explicitly called?

I'm aware of .read(), but I'm looking for a general solution that would disable dirty-checking globally.


I don't think there's an perfect solution for your question. Referring to this issue discussion, Disabling dirty-checking is impossible without interfering to Hibernate basic workings. Personally, I don't think it worth the risks.

0

精彩评论

暂无评论...
验证码 换一张
取 消