[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-160) Add default name support for @Index
Geoffrey De Smet (JIRA)
noreply at atlassian.com
Fri Feb 8 06:00:58 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29484 ]
Geoffrey De Smet commented on ANN-160:
--------------------------------------
Doing this with the NamingStrategy would be great.
Can we rename the issue title to
"Support defaulting @Index name in the NamingStrategy"?
> 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