[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-141) Add annotation support for UserCollectionType

Endre Jeges (JIRA) noreply at atlassian.com
Mon Sep 15 18:02:06 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31198#action_31198 ] 

Endre Jeges commented on ANN-141:
---------------------------------

I was thinking about the last post in this issue.

I have just bumped in the same issue that I could not create an easy to use solution to persist a bitemporal collection (something like this: http://martinfowler.com/ap2/temporalProperty.html). It is a returning problem in my domain, that is why I needed a uniform solution for it.

If I would be forced to define the base collection type of my custom collection I would be in trouble since none of the standard collections (set, list, map, bag) would be appropriate. The bitemporal collection has record and actual time interval as "indices", but it is surely not an other implementation of any standard collection.

Therefore I would give a vote to the solution that Douglas.

> Add annotation support for UserCollectionType
> ---------------------------------------------
>
>                 Key: ANN-141
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-141
>             Project: Hibernate Annotations
>          Issue Type: Patch
>          Components: binder
>    Affects Versions: 3.1beta6
>         Environment: All versions, database agnostic
>            Reporter: Douglas Sjoquist
>            Priority: Minor
>         Attachments: UserCollectionTypeAnnotation.zip
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> Add an annotation to specify the UserCollectionType for a OneToMany or ManyToMany.
> The annotation is named CollectionTypeInfo, perhaps better named UserCollectionType, but I didn't know the standards for naming classes.
> The change to AnnotationBinder is minor and is delineated by '//dwsjoquist//'  comment lines.
> Usage:
>     @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
>     @JoinColumn(name = "id")
>     @CollectionTypeInfo(name = "examples.MyUserCollectionType")
>     public List<ExampleAttribute> getExampleAttributes() {

-- 
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