[hibernate-dev] Envers in Hibernate

Adam Warski adam at warski.org
Thu Oct 23 04:42:45 EDT 2008


Hello,

> I can see the confusion. Hibernate has a similar annotation for
> optimistic locking which nearly matches "Versioned" in Envers.
Yes, @Version. But it's for a totally different thing. So far I only  
once I had a question on the forum if @Versioned and @Version are  
related in any way. Do you really think it creates confusion?

> Some "Version"-free class naming ideas:
>
> RevisionListener
> VersionsReader -> RevisionReader | HistoryReader
The "RevisionXXX" names would suggest that it's for reading revision  
data, so revision entities, not the acutal historic data. If at all,  
"HistoryXXX" seems much better (HistoryReaderFactory,  
SecondaryHistoryTable, HistoryTable, HistoryJoinTable).

If there would be a name change, then the old classes/annotations  
should be deprecated, not removed - people wouldn't want to see their  
code broken after upgrading to a newer version.

> Unversioned -> Unrevised | Untracked ?
> Versioned -> Revised | Historical
There was also the idea of "Historized" :) Then also: Unhistorized.

> VersionsJoinTable -> RevisionJoinTable | HistoryJoinTable
> VersionsTable -> RevisionTable  | HistoryTable
>
> Envers -> Enrise -> Enhist ?
I would keep the current name, people got used to it :) And it doesn't  
directly suggest anything with versioning.

Adam



More information about the hibernate-dev mailing list