Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
2048 | major | always | 10-09-07 08:16 | 11-07-07 15:49 | |
|
|||||
Reporter: | westrupp | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.3 | ||
Product Build: | Resolution: | no change required | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
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 |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|