From: <no...@at...> - 2005-07-06 01:50:59
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- 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: Tue, 5 Jul 2005 8:50 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 |
From: <no...@at...> - 2005-07-22 06:46:16
|
The following comment has been added to this issue: Author: Bonny Rais Created: Fri, 22 Jul 2005 1:38 AM Body: Would anyone from the Hibernate team like to comment on this proposal, or am I not providing enough information regarding this feature? Cheers, Bonny --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_18968 --------------------------------------------------------------------- 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: Fri, 22 Jul 2005 1:38 AM 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 |
From: <no...@at...> - 2005-07-22 07:09:22
|
The following comment has been added to this issue: Author: Emmanuel Bernard Created: Fri, 22 Jul 2005 2:08 AM Body: The index element is used to describe a list index column, not really for a DB index, we should find an other name like column-index. Are indexes of columns owned by both a class and its <subclass> work well? --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_18969 --------------------------------------------------------------------- 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: Fri, 22 Jul 2005 2:08 AM 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 |
From: <no...@at...> - 2005-07-22 09:26:27
|
The following comment has been added to this issue: Author: Bonny Rais Created: Fri, 22 Jul 2005 4:25 AM Body: Emmanuel, I don't see any reason why this should not work, unless I'm missing something really obvious here? --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_18973 --------------------------------------------------------------------- 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: Fri, 22 Jul 2005 4:25 AM 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 |
From: <no...@at...> - 2005-07-23 06:44:18
|
The following comment has been added to this issue: Author: Bonny Rais Created: Sat, 23 Jul 2005 1:44 AM Body: Whilst I have not tried this on a joined or union subclasses, the way I've used it simply uses the current <property> handling for the index attribute, so I assume the same checking for indexes across multiple tables would be performed. Again, all my proposed change is doing is simply a different organisation of the same activity that takes place when using the index attribute. Cheers, Bonny --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_19003 --------------------------------------------------------------------- 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: Sat, 23 Jul 2005 1:44 AM 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 |
From: <no...@at...> - 2005-07-28 22:41:49
|
The following comment has been added to this issue: Author: Bonny Rais Created: Thu, 28 Jul 2005 5:41 PM Body: Emmanuel, Did you have a chance to evaluate my response? I'm sure you guys are busy with the next release, but this is only a small change, I'm happy to send a patch file or my changed versions of HbmBinder and the Hibernate DTD for my proposal. I'm also happy to assist if I can in any way that will promote this. Of course, if this can be done using other means, I'll be happy to use it. Cheers, Bonny --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_19080 --------------------------------------------------------------------- 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 5:41 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 |
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 |
From: <no...@at...> - 2005-08-01 01:44:20
|
The following comment has been added to this issue: Author: Bonny Rais Created: Sun, 31 Jul 2005 7:26 PM Body: Emmanuel, Regarding the xml mapping entity name, I think you are right, and it should be named differently. I just chose to introduce the smallest possible change to the dtd. Had I chosen to describe it using a different element, I would introduce the following construct to the dtd: in the class construct, under the join* element, notice the column-index: <!ELEMENT class ( meta*, subselect?, cache?, synchronize*, (id|composite-id), discriminator?, (version|timestamp)?, (property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array|query-list)*, ((join*,subclass*)|joined-subclass*|union-subclass*), (column-index)* <!-- ** new column index ** --> loader?,sql-insert?,sql-update?,sql-delete?, filter* )> and the definition of the column-index itself is: <!ELEMENT column-index (column*)> <!ATTLIST index name CDATA #REQUIRED> <!ATTLIST index unique CDATA #IMPLIED> where the unique attribute designates the index as a unique constraint and defaults to false. With respect to the inclusion of tne column-index definition within the class element - there will need to be checks performed to ensure this is not misused and/or included in places that do not make sense (as you mentioned, such an index can not be used across tables) Any idea when this would become available? Cheers, Bonny --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_19111 --------------------------------------------------------------------- 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: Sun, 31 Jul 2005 7:26 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 |
From: <no...@at...> - 2005-08-05 06:59:10
|
The following comment has been added to this issue: Author: Bonny Rais Created: Fri, 5 Aug 2005 1:57 AM Body: Gavin, Would you like to comment on this proposal? Cheers, Bonny --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_19180 --------------------------------------------------------------------- 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: Fri, 5 Aug 2005 1:57 AM 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 |
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 |
From: Tobias (JIRA) <no...@at...> - 2006-03-22 04:17:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_22548 ] Tobias commented on HHH-710: ---------------------------- I don't see how it is possible right now to control the order in which multiple columns are added to an index. There are situations where the "proper" ordering of the columns lets the DBMS use one index for multiple types of queries while reversing the order of the columns in the index makes it unuseable for all types of queries but one. Example queries: select ... from ... where a=? and b=? select ... from ... where b=? You either create two indexes with (a,b) and (b) or just one index (b,a) that can be used for both queries. > 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 |
From: Bonny R. (JIRA) <no...@at...> - 2006-03-22 15:23:16
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-710?page=comments#action_22558 ] Bonny Rais commented on HHH-710: -------------------------------- This is one of the problems - the fact that currently there's no way to create multiple indexes. Moreover, the fact that the columns cannot be organized may mean that typical queries would execute more slowly because of the arbitrary ordering of index columns. > 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 |