3 Replies Latest reply on Oct 20, 2008 7:09 PM by stanton fisque

    ignoring columns for update detection

    stanton fisque Newbie

      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.

      example:

      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?

      TIA

      == stanton