[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5950) Make @UniqueConstraint inheritable

Emmanuel Bernard (JIRA) noreply at atlassian.com
Wed Feb 23 04:25:08 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=40059#action_40059 ] 

Emmanuel Bernard commented on HHH-5950:
---------------------------------------

Hum, I've never been a big fan of this approach of sticking physical concerns on the logical @MappedSuperclass. 
It also put some expectations on how your can factor things like a template id generator defined partially on the superclass.

What's your use case? Do you really have a wide subtree of subclasses?

> Make @UniqueConstraint inheritable
> ----------------------------------
>
>                 Key: HHH-5950
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5950
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: annotations
>    Affects Versions: 3.6.1
>            Reporter: Manuel Bernhardt
>
> It would be really nice to be able to define a @UniquenessConstraint in a @MappedSuperclass so that all subclasses carry this constraint. Right now, the following constraint is ignored:
> @MappedSuperclass
> @Table(uniqueConstraints = {@UniqueConstraint(name="inheritedConstraint", columnNames = {"matter", "value"})})
> public class Space { ... }

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