From: <leg...@at...> - 2004-06-04 13:23:50
|
The following comment has been added to this issue: Author: Chris Webb Created: Fri, 4 Jun 2004 8:37 AM Body: Can someone tell me what is happening to this patch. I've just seen in the forums a similiar feature request by someone else.... http://forum.hibernate.org/viewtopic.php?p=2204714#2204714 --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HB-92?page=comments#action_13356 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HB-92 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-92 Summary: Retrieving native generated identifiers does not support generic Hibernate types Type: Patch Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate2 Components: core Versions: 2.0 final Assignee: Gavin King Reporter: Chris Webb Created: Wed, 21 May 2003 5:00 AM Updated: Fri, 4 Jun 2004 8:37 AM Description: At present Hibernate does not support identifier types other than Short, Integer or Long for native generated identifiers. This presents a problem when a user defined type is used to encapsulate an identifier that can support natively generated identifiers. An example is where a identifier type is defined that stores the natively generated value internally as a long, thus is similiar to a Long type but not actually a Long type. The solution is to use the actual identifier type to extract the identifer value from the appropriate retrieve identifier SQL result set rather than the method IdentifierGeneratorFactory.get(ResultSet, Class) which in fact has been flagged as inappropriate in the source code documentation. A patch has been supplied that does the following: 1. Removes the method get(ResultSet, Class) from IdentifierGeneratorFactory. 2. Changes SequenceGenerator and AbstractEntityPersister to add an 'id' column alias to the SQL used for retrieving the natively generated identifier. 3 Changes SequenceGenerator, EntityPersister and NormalizedEntityPersister to retrieve the identifier value from the SQL result set using the identifer type via the method nullSafeGet(ResultSet rs, String colName, SessionImplementor session, Object owner). --------------------------------------------------------------------- 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 |