From: <leg...@at...> - 2003-08-08 00:08:16
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@in...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-232 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-232 Summary: Custom types cannot be uses for ids with indentity and sequence generators Type: Improvement Status: Assigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0rc2 Assignee: Gavin King Reporter: James Lewis Created: Tue, 5 Aug 2003 9:37 AM Updated: Thu, 7 Aug 2003 7:07 PM Environment: Any environment. MySql DB Description: All of my persistent objects have a custom primary key object. For instance, my Part object has a PartID as the key. This allows me to perform compile time type checking in my service layer. I was ably to create a UserType that converted the coulmn type of integer to PartID. No problem, it worked great. However, the IdentityGeneratorFactory throw an exception because my custom types return PartID.class as the return type. The IdentityGeneratorFactory's 'get' method only takes classes that are of type Integer.class, Long.class, and Short.class. The API should be changed so that the get method returns a Serializable instead of a Number, and takes a Type instead of a class. This would allow the IdentityGeneratorFactory to return the custom class type. What are your thoughts. James --------------------------------------------------------------------- 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 |