Hi,
we have this complex scenario:

public Class A{

private long id;

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval 
= false)
private List<A> child = new ArrayList<A>();

@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = 
true)
private A parent;
}

On the client I have a tree showing our objects. I want to edit an item of 
the tree and change its parent. So I make a request to server in which I 
persist the item I changed. But in this manner on the server I have an 
ConstrainViolationException because the old parent still have the object 
the i changed on his list's child. So, in order to make work this example I 
have to make 2 requests, the first to modify the old parent's child list, 
and then a  request to modify the item I changed. It's work fine but this 
not guaratees the transaction.

Any suggestions?

Thanks

Daniele

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/D12Jz3prbwkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to