开发者

ejp : how to save modified objects?

开发者 https://www.devze.com 2023-04-12 09:03 出处:网络
I am using e开发者_开发知识库jp, it\'s a simple orm framework. If 1000+ objects were loaded with ejp, but a few of them are modified, how to save change? Should I find the the modified onesmyself ?

I am using e开发者_开发知识库jp, it's a simple orm framework.

If 1000+ objects were loaded with ejp, but a few of them are modified, how to save change? Should I find the the modified ones myself ?

If you have experience with ejp, please tell me.


Unlike Hibernate/JPA which associates an object with a "persistence context", EJP does not associate objects with a given context. Objects are independent and can last beyond any context. Therefore, you want to use saveObject() when you update an object. If the object has changed, it will be updated in the database, otherwise it wont. With EJP objects are valid as long as they exist.

0

精彩评论

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

关注公众号