[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3614) Version Tagging
Corneil du Plessis (JIRA)
noreply at atlassian.com
Thu Nov 20 14:52:15 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31757#action_31757 ]
Corneil du Plessis commented on HHH-3614:
-----------------------------------------
Another note:
1 version of 1 entity can have many tags.
only 1 version of an entity can be assigned a specific tag.
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list