[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - ignoring columns for update detection
do-not-reply at jboss.com
Fri Oct 17 14:31:49 EDT 2008
i have a set of entities that have two "meta data" columns, namely, "editor" and "updated" which are a UID and a date.
we are processing import files and persisting/merging the data that comes in. what i need, if it is possible, is a way to configure JPA (or hibernate directly) to ignore the "editor" and "updated" fields when the call to "merge" is done, so that if the entity is identical to what the database has, it discards the merge, even if the editor and updated are newer, because the relevant data is not updated.
i have a bean with a first_name, last_name attribute, editor, and updated. the first_name and last_name attributes are identical to the database, but the editor and updated fields correspond to the process that is requesting the update. is there a way via configuration, annotation, or callback, to have hibernate ignore the updated and editor attributes when trying to detect if it needs to do an update or not?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182978#4182978
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182978
More information about the jboss-user