Cool didn't know that method existed.
Although the method and the wikipedia article don't go well together. I think database replication normally refers to some kind of automatic process, while Hibernate just allows to replicate one object(-graph) on demand. That is really why I was so confused.
If I got it right your question is how hibernate will behavee when the target store already has a version of the object to be replicated?
I think the answer is right there in the piece of documentation you referenced:
Quote:
The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database.
*
ReplicationMode.IGNORE - ignore the object when there is an existing database row with the same identifier
*
ReplicationMode.OVERWRITE - overwrite any existing database row with the same identifier
*
ReplicationMode.EXCEPTION - throw an exception if there is an existing database row with the same identifier
*
ReplicationMode.LATEST_VERSION - overwrite the row if its version number is earlier than the version number of the object, or ignore the object otherwise
To determine which version is the latest I'd assume that the version attribute defined by the hibernate mapping is used.