[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3614?page=c...
]
Adam Warski commented on HHH-3614:
----------------------------------
Hello,
ok, you convinced me, maximize() in not going to work for you :)
Looking forward to the API proposition then :)
I was also thinking about how to access tagging - maybe auditReader.getTagging() would be
better then an add-on? How do you think? Of course, getTagging() would return a not-null
utility class iff the user uses tagging.
Adam
Version Tagging
---------------
Key: HHH-3614
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3614
Project: Hibernate Core
Issue Type: New Feature
Components: envers
Reporter: Corneil du Plessis
I would like to suggest a new feature for version tagging in envers.
I have a suggestion for how it can be implemented.
@Versioned
@Taggable
public class MyEntity {
@Id
private Long id;
@Basic
String someProp;
}
By implication results in @RevisionTagEntity which can be seen as
public class MyEntity_tag {
@RevisionNumber
private Integer version_numer;
@RevisionTagTimestamp
private long tag_date;
@RevisionTagValue
private String tag; // Other @Colum can apply as well as using Integer or Enum
// Other properties allow like with @RevisionEntity
}
This produces a table like:
create table MyEntity_tags (
id bigint not null,
version_number integer not null, // version_number is _revision
tag_date timestamp not null, // assigned when create or modified
version_tag varchar(255) not null, // Could be customizable with
RevisionTagEntity similar to RevisionEntity
primary key (id, version_tag),
);
EntityTagging will be a utility class using EntityManager and Entity or Collection of
Entities and do:
tagLatestVersion(Object entity, String tag)
tagVersion(Object entity, Integer version, String tag)
moveTag(Object entity, String targetVersion, String tag)
determineVersion(Object entity, String tag)
The following could be added to allow the retrieval of versions of collections of
entities that are tagged in a specific way.
RevisionProperty.tag(String tag)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira