From: <leg...@at...> - 2003-06-11 13:03:19
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@in...) Date: Wed, 11 Jun 2003 8:01 AM Changes: type changed from Bug to Patch --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-92&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=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: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0 final Assignee: Gavin King Reporter: Chris Webb Created: Wed, 21 May 2003 5:00 AM Updated: Wed, 11 Jun 2003 8:01 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/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |