Any idea anybody?

Thanks,
Markus

On Wednesday, 18 December 2013 17:19:03 UTC+1, Markus Menner wrote:
>
> Hi guys,
>
> I'm using 1.6.2 and the ObjectDatabase.
>
> I just ran into an issue that has to do with one of the JPA annotation 
> options: CascadeType.REMOVE.
>
> I have a Class (let's say A) that contains a Set of associated (let's say 
> B's).
>
> For the Set of B's in A I used the following 
> annotation: @OneToMany(cascade=[CascadeType.REMOVE], 
> mappedBy='someattribute')
>
> My expectation was that OrientDB would delete the associated B's (only) 
> once an A is deleted.
>
> But that's not the case.
>
> B's are even deleted, once you just remove them from the containing set, 
> which in my understanding is not the right behavior?
> I would expect them just to be removed from the set but still exist?
> They should only be deleted, if an A is deleted that contains those B's?
>
> If we can't change it: is there an alternative way to achieve the desired 
> behavior?
>
> Thanks,
> Markus
>
>
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to