-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Rest service with collections
PostPosted: Fri Nov 30, 2012 1:53 pm 
Newbie

Joined: Sat Feb 05, 2011 11:27 am
Posts: 14
I have a REST service that uses Hibernate to persist/retrieve its data. On the front end the service produces and consumes XML.

I have this scenario:

@Entity
public class A{
private long id;
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade({CascadeType.ALL})
private List<B> list = new ArrayList();

}

@Entity
public class B{
private long id;
private String name;
...
...
}

On the client I get a object A with the list of objects of type B. But if in the client I remove an object on the server this modify is not persisted. I think that Hibernate don't have the entire graph of my object because Jersey rebuild it from XML.

How I can resolve this problem?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.