[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-160) Add default name support for @Index

Anders Wallgren (JIRA) noreply at atlassian.com
Fri Feb 8 10:08:33 EST 2008


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

Anders Wallgren commented on ANN-160:
-------------------------------------

DB2 is even more limiting (18 characters, I think) -- once all the vowels are trimmmed out of the name to make it short enough, it may as well be a hash key ;-)

> Add default name support for @Index 
> ------------------------------------
>
>                 Key: ANN-160
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-160
>             Project: Hibernate Annotations
>          Issue Type: Improvement
>          Components: binder
>    Affects Versions: 3.1beta6
>            Reporter: Leonardo Quijano
>         Attachments: Index.patch
>
>
> Currently the "name" parameter for @Index is required. A default naming strategy could be used with @Index annotations, though, allowing the app to pick default names if the parameter is not specified.
> For example:
> Foo.java {
> @Index
> public String getSomePropertyValue()
> }
> This would generate a DB index called "foo_some_property_value_index", for example. Of course, that would depend on the naming strategy. A useful approach would be to use "entity" + "propertyName" + "index_suffix" based on the current NamingStrategy object.
> Specifying index names on all required properties is very verbose and could lead to errors.

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