105 words

Entity not removed 100%

#1
2017-03-24 19:03

When I remove an object from a class it get's removed but the other objects that had that object as an attribute still keep it although I am using @OneToMany(cascade=CascadeType.ALL)

This is what it remains when I check the removed object from another object's attributes

 

 

Unknown
Unknown's picture
Joined on 2017-03-09
User Post #4
#2
2017-03-27 12:15

It is the application responsibility to clear references to removed objects. Cascading removal operates on the other direction and cannot clear references after removal. If you use bidirectional relationship then you only have to clear the owner side, the owned side will be cleared automatically after refresh.

Could you please change your username from "Unknown" to something less confusing? Thanks!

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,726

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel