-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate doesn't seem to mesh with Apache Axis
PostPosted: Wed May 26, 2004 4:25 pm 
Newbie

Joined: Wed May 19, 2004 7:39 pm
Posts: 16
Location: Canton, GA
Something really isn't clicking here.

I have a web service and a sevice client that both use the same core jar lib. In the core, I have data transfer objects and hibernate mapping XML definitions for server, address book, user, and group information.

When the client queries for a server object including the address book, users, and groups, everything works fine. I get all the data using non-lazy loading <set> relationships.

When saving this in the client application database using hibernate, I can save the server object using:

session.save(serverDto);

However the above throws an error. The server object INSERT's fine, but hibernate is attempting to UPDATE the child objects, namely address book. This of course fails with an object sync error.

I've tried various solutions, but nothing seems to be the "right" way. I need to:
- Get the DTO data.
- Save the DTO data.
- Use the DTO data and relationships to make a JTree model.

When I save a parent object, I have to set the parent's collections to NULL, such as serverDto.setAddressBooks(null). Then I can save server without Hibernate trying to update the address book record. However I need this relationship for the JTree model building.

Any help would be greatly, greatly appreciated.


Top
 Profile  
 
 Post subject: One more point...
PostPosted: Wed May 26, 2004 4:28 pm 
Newbie

Joined: Wed May 19, 2004 7:39 pm
Posts: 16
Location: Canton, GA
I forgot one item, all the DTO data needs to keep the existing primary keys from the web service call. These keys are GUIDs that will be used to relate client to server data later in the application.

Otherwise I'd just kill all the PKs and we'd be fine.


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

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.