design patterns - Why do DAOs have separate create and update methods? -
I'm looking at some design for DAO interface, I have a single update ()
The method is different, while the other is different create ()
and update ()
methods.
It is possible to do something on the lines of 'Insert updates', assuming, what is the benefit of a separate form ()
method? Thanks in advance for your help?
Cheers, Ross
I explicitly make DAO for clarity and clarification Time uses two different methods.
If there is a single update method and passes through an existing object, it will be updated. But what if someone really wants to create a new object and the fact that it already exists is an error?
With a single update method, there really is no way to tell anyone what's actually going on behind the curtains.
Comments
Post a Comment