openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste BRIAUD -- Novlog <j-b.bri...@novlog.com>
Subject Delete or merge, update or merge ?
Date Sat, 08 Aug 2009 06:57:26 GMT
Hi,

say I have one instance to delete, an instance of B knowing that A  
contains one to many B.

Should I merge A with one less B, that should delete the required B or  
should I explicitly delete that B with a delete by query or should I  
use the remove(thatB) API ?
What are the differences in term of design, memory, performance, ... ?

Quedtion also apply in case of a new B : merge on A, insert by query  
or persist(thatB) on entityManager ?

The same question apply to merge or update by query one B.

Thanks !

Mime
View raw message