开发者

JDO - Should I use detachCopy or makeTransient?

With JDO, when should I use detachCopy and when should I use makeTransient?

Wha开发者_如何学Got exactly do each of them do?


I'm sure we wrote docs about those things ... http://www.datanucleus.org/products/accessplatform/performance_tuning.html though obviously the JDO spec defines them way better


From http://db.apache.org/jdo/attach_detach.html

A detached object retains the id of its datastore entity. Detached objects should be used where you want to update the objects and attach them later (updating the associated object in the datastore. If you want to create copies of the objects in the datastore with their own identities you should use makeTransient instead of detachCopy.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜