[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-484?page=all ]
Max Rydahl Andersen closed HBX-484:
-----------------------------------
Resolution: Fixed
assume fixed.
Generated DAOs and POJO only work with JDK5 when using bigint or
smallint as ID
-------------------------------------------------------------------------------
Key: HBX-484
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-484
Project: Hibernate Tools
Type: Bug
Components: reverse-engineer
Versions: 3.1beta1
Environment: hibernate 3.05
hsql 1.7.1 or postgres 7.4.7
Reporter: Heinz Stüßer
Attachments: daohome.vm.patch, testcase.zip
Using the eclipse-plugin I generated POJOs and DAOS for the tables created with the
script create.sql.
1st)
The generated DAOs contain code (in the method findById) when using smallint or bigint as
primary key which only works fine with JDK5. Using int as primary key produces correct
code for all JDKs. Smallint or bigint are converted in the POJOs and the DAOs to the
primitive java-datatypes small resp. long, while int is converted to the an object of
type Integer.
The attached testcase.zip contains a createscript for 3 tiny tables and the generated
DAOs and POJOs.
2nd)
daohome.vm contains code which results in a static import anytime. The attached
daohome.vm.patch contains a patch to fix this problem.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira