I suggest to update all the VO fields. In such way you can reuse the
same code in different situations while overhead of DB update and object
transfer is minor.
Aaron
-----Original Message-----
From: An interest list for Sun Java Center J2EE Pattern Catalog
[mailto:J2EEPATTERNS-INTEREST@(protected)
Sent: Wednesday, April 21, 2004 11:44 AM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: data update best practices
hi all;
i have a situation where i pass a value object to a client. the client
will usually need to modify 1 or 2 attributes on the VO (which has many
attributes). i need to submit the changes back to the server. what i
havnt decided is if its valid to update all my data according to the
'new VO' (which is my old VO with minor changes) or just update the
fields that have chaned. in order to update the fields that have
changed, i need to add flags to indicate dirty attributes and i dont
know if i like it architecture wise.
are there any patterns for such updates?
thanks.
____________________
Guy Katz
Allot Communications
gkatz@(protected)
tel: +972 9 7619288
fax: +972 9 7443626
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)