[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2060) To be able to use <generator> with <composite-id>

Jacob Robertson (JIRA) noreply at atlassian.com
Fri Aug 17 12:48:13 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27874 ] 

Jacob Robertson commented on HHH-2060:
--------------------------------------

My company has a very similar need.  In our case, the Data teams have determined that for particular high-volume tables, we will assign a surrogate "GUID" that is spread across two DEC(11) columns.  This decision is completely out of the hands of the java developers.  We are looking into using things like Interceptor (as Gavin seems to recommend in HD-389) to handle this, but it would certainly be a much simpler solution to do what Xavier shows.

I notice that this issue has remained un-commented on for almost a year now, and the previous issue (under Hibernate-2) was marked as "rejected" with Gavin's comment that "a synthetic composite key is non-meaningful".  Is there any chance of re-visiting this?  If not, perhaps this issue could also be closed and "rejected" with some further explanation.  Otherwise, we have demonstrated a real-world need for this feature, and Xavier seems to have demonstrated that is would be simple for Hibernate to make this feature available.

> To be able to use <generator> with <composite-id>
> -------------------------------------------------
>
>                 Key: HHH-2060
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2060
>             Project: Hibernate3
>          Issue Type: Improvement
>    Affects Versions: 3.2.0.cr4
>         Environment: Hibernate 3.x
>            Reporter: Xavier Brénuchon
>
> Hello, 
> This is the continuation of HB-389
> We develop an application which has very strong need for performance with several tens of million recordings. Partitioning is a need.
> So for that, I use <composite-id>. But my primary key is not a natural key, but a real technical key :
>  - column of partitioning for optimization of the data base 
>  - column of technical id
> So I need to have a generator, for exemple :
>     <composite-id name="id" class="IdPartition">
>         <key-property name="org" type="string" column="ORG"/>
>         <key-property name="id" type="long" column="ID"/>
>         <generator class="fr.test.xavier.IdPartitionGenerator">
>             <param name="table">TAB_SEQ</param>
>             <param name="column">LAST</param>
>         </generator>
>     </composite-id>
> The good news is that Hibernate can use that (HB-389).
> In fact, it is enough to modify the DTD to authorize <generator> in <composite-id> and it is all. The current code of Hibernate manages it very well. 
> Is it possible that Hibernate is enriched by this functionality?

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