[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-261) Allow specifying foreign key constraint name using annotations

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Aug 18 18:48:19 EDT 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-261?page=all ]
     
Emmanuel Bernard resolved ANN-261:
----------------------------------

    Resolution: Fixed
     Assign To: Emmanuel Bernard

I've used the ideas of David's patch.
The patch does not work on 
@ManyToOne @JoinTable or @OneToOne @JoinTable because I map that using a <join>
If someone can provide a patch for that, that'd be great.


> Allow specifying foreign key constraint name using annotations
> --------------------------------------------------------------
>
>          Key: ANN-261
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-261
>      Project: Hibernate Annotations
>         Type: Improvement

>   Components: binder
>     Versions: 3.1beta8
>     Reporter: Paul Barry
>     Assignee: Emmanuel Bernard
>     Priority: Minor
>      Fix For: 3.2.0
>  Attachments: hibernate-annotation-3.2.0.CR2-fk2.patch, hibernate-annotations-3.2.0.CR1-fk.patch, hibernate-annotations-fk.patch
>
>
> Using hbm.xml configuration for many-to-one, there is a foreign-key property that allows you to specify the name of the FK constraint.  It would be nice if there was something similar for annotations, such as @ManyToOne ( constraintName = "FK_WHATEVER").  Also, a sensible default would be nice to, for example FK_TABLE_NAME_COLUMN_NAME, rather than FK20708CF6792111.  I know Oracle has a 30 char limit for constraint names, so there would have to me some logic to find a way to abbreviate it.

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