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
|
|