From: <no...@at...> - 2005-07-29 04:37:50
|
The following comment has been added to this issue: Author: Emmanuel Bernard Created: Thu, 28 Jul 2005 11:36 PM Body: Seems good, I actually did something similar for the annotations based on your request ;-) you can check the EntityBinder.addIndexes() method The only thing that bother me is to reused <index> for 2 diff purpose (ie collection index column and DB index). --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_19081 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-710 Summary: Multi Column Index / Column in Multiple Indexes feature Type: New Feature Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.5 Assignee: Reporter: Bonny Rais Created: Tue, 5 Jul 2005 8:50 PM Updated: Thu, 28 Jul 2005 11:36 PM Environment: N/A Description: There are many requests in the forum regarding Multi Column Index, declared separately from property declarations in mapping files. Hibernate already supports this capability, but only by way of marking a property as participant in an index using the index attribute in mapping files. Recent enhancement means that the same column can be declared to be in multiple indexes. However, there is no control over the order of columns in the index or whether the index is unique. I've had a go at implementing this feature and to the best of my ability to check, there are minor modifications required: 1. The DTD needs to change in two places: a. The class entity requires having a new entity reference to the index clause ( add a '(index)*,' after the property references) b. add two attributes to the index entity itself: 'name' and 'unique' and make them implied to ensure backwards compatibility. 2. HbmBinder.java needs to have a small fragment added to detect the index element within the class node and use the currently existing methods to add or create indexes. I can produce a patch file to show these differences, so people in the Hibernate team can have a look and comment. I have tested this in my environment, which admittedly is not very large or representative of all scenarios, but it works and works well. Cheers, Bonny --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |