Anonymous | Login | Signup for a new account | 04-26-2024 16:21 PDT |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002048 | [Resin] | major | always | 10-09-07 08:16 | 11-07-07 15:49 | ||||
Reporter | westrupp | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | no change required | ||||||
Status | closed | Product Version | 3.1.3 | ||||||
Summary | 0002048: amber many-to-many cascade merge() does not delete children | ||||||||
Description |
// begin transaction ... // child to be deleted int appId = 1; // parent int userId = 1; User user = em.find(User.class, userId); Collection apps = user.getApplications(); Collection newApps = new ArrayList(); for (Iterator iterator = apps.iterator(); iterator.hasNext();) { Application o = (Application) iterator.next(); if (o.getAppId().intValue()!=appId){ newApps.add(o); } } user.setApplications(newApps); em.merge(user); // ... commit transaction // child is not deleted |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Notes | |
(0002461) ferg 11-07-07 15:49 |
The merge operation does not automatically delete children, according to the JPA specification. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |