From: Jimmy W. (JIRA) <no...@at...> - 2006-01-30 17:12:06
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_21912 ] Jimmy Wan commented on HHH-710: ------------------------------- Has there been an update? I'm interested in finding out more about this feature. I would prefer not to try and build this into a patched version of Hibernate or have to write some external mechanism to do this. > Multi Column Index / Column in Multiple Indexes feature > ------------------------------------------------------- > > Key: HHH-710 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710 > Project: Hibernate3 > Type: New Feature > Components: core > Versions: 3.0.5 > Environment: N/A > Reporter: Bonny Rais > > > 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 -- 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 |