[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-691) Allow @GeneratedValue-like feature on the TYPE level

Paul Benedict (JIRA) noreply at atlassian.com
Sun Jan 20 19:13:56 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29381 ] 

Paul Benedict commented on ANN-691:
-----------------------------------

This request makes sense as a JPA 2.0 wish-list feature :-) but I was hoping for a Hibernate extension annotation solution in the meantime.

> Allow @GeneratedValue-like feature on the TYPE level
> ----------------------------------------------------
>
>                 Key: ANN-691
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-691
>             Project: Hibernate Annotations
>          Issue Type: Improvement
>    Affects Versions: 3.3.0.ga
>            Reporter: Paul Benedict
>
> I have a generic hierarchy annotated as a @MappedSuperclass and a generic getId() method annotated as @Id. I use generics to specify the type, but I do not want to specify the generation strategy until the subclass.
> Since @GeneratedValue can only be applied to a FIELD or METHOD, there is no way to say it in Hibernate at the class level, which I think is a valuable extension. Since there can only be one ID per class, it makes sense allowing a look-a-like annotation at the TYPE level too.

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