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