Once again there is there is no setting in JPA that can be applied to a relationship from one entity to another that will cause it to be removed from a parent. Relationship maintenance is the responsibility of the application.
yeah i solved many problemes after that but it seems that i havn't figured it out completely :p.
any way this time i am not trying to delete it from a parent entety and it is not the parent to any entity.
for the statu it's not null i sysouted it before deleting!
As I said I think there are very very very few (if any) scenarios where it ever makes sense to have a CascadeType.REMOVE on anything other than a @OneToOne or @OneToMany. You have them all over the place including on @ManyToOne and @ManyToMany. I reiterated this twice in the other thread. I do not doubt that you have slapped this on there thinking it is somehow going to manage your relationships for you. It does not work like that the application needs to manage the relationship. You have posted the mapping files but not the code you are actually trying to run. My guess is a combination of your wrongly placed cascades and failure to manage both sides of the relationship are causing this problem. Also remember that hibernate does things in a particular order inserts are done before deletes. This is done to avoid key violations but sometimes when it is all in one transaction you need to override this behavior and use flush to make sure things happen in the proper order. One other thing to remember is deleting something out of the database does not remove it from a list. You must do that. Managing the in memory objects are also the applications job.
subject: deleting causes : not-null property references a null or transient value