-->
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: Design question for update method
PostPosted: Wed Jul 12, 2006 7:01 am 
Beginner
Beginner

Joined: Wed Apr 05, 2006 5:01 am
Posts: 20
Hi,

i have a general design question. I have a Webapplication and a webservice both exposing the possibilty to update the data of a domain object.
This domain object has a technical id used as primary key in the db and a natural id from the business domain (this one might change over time).

In the webaplication updating the domain object is pretty straightforward because i can return the technical id in the model returned with the view
to the client browser and on submitting the changed data i can easily use the session's update method. But implementing the webservice gets more difficult.
I can't expect the users of the webservice to have the technical id of the domain object to update. All they have is the natural id. Thus i would have
to do a query with the given natural id first and then update the retrieved object with the new data. I'm not sure if this is good practice... Updating
an object would always require to do a SELECT beforehand.
Has anybody a good idea how to solve this more elegantly?

thanks & regards,
--jan


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.