开发者

how does toplink session.refreshObject() handle one to many mappings?

开发者 https://www.devze.com 2023-04-11 11:52 出处:网络
am using the Session.refreshObject(Object o) method to fresh an object that has a getList() method. This开发者_Go百科 list is provided by toplink using a one to many mapping. When I refresh the object

am using the Session.refreshObject(Object o) method to fresh an object that has a getList() method. This开发者_Go百科 list is provided by toplink using a one to many mapping. When I refresh the object, I want this list to be refreshed too. Is this possible or I have to refresh something else?

Thanks in Advance!


refreshObject is equivalent to calling ReadObjectQuery.

If you want to refresh objects in cascade you can use ReadObjectQuery.cascadePrivateParts(). According to the doc this method

Cascade the query and its properties on the queries object(s) and all privately owned objects related to the queries object(s)

.


I depends on the mapping of the entity in the list. But if you want to actually refresh those objects you must do a

refreshObject(o.getList());
0

精彩评论

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

关注公众号