[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-548?page=all ]
Norm Lee updated HBX-548:
-------------------------
Attachment: DB2OS390MetaDataDialect.java
Since I was unable to get the packages rebound on the mainframe, I created a new dialect
named DB2OS390MetaDataDialect. Instead of using column names, the ordinal position is
used when referencing the result set.
I have tested this with both Version 7 and Version 8 of DB2 on OS/390.
FAQ. DESCSTAT=YES required for DB2 on z/OS
------------------------------------------
Key: HBX-548
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-548
Project: Hibernate Tools
Type: Improvement
Components: reverse-engineer
Versions: 2.1, 3.0alpha, 3.0alpha2, 3.0alpha3, 3.0beta1, 3.0beta2, 3.0alpha4,
3.0beta3, 3.1beta4, 3.1alpha5, 3.1beta1, 3.1beta2, 3.1beta3, 3.2LATER
Environment: DB2 os/390
Reporter: Matthew Aston
Priority: Trivial
Attachments: DB2OS390MetaDataDialect.java
When using Hibernate Tools with DB2 on z/OS (Mainframe), be aware that you need to set
DESCSTAT=YES and rebind the packages in order for getMetaData().getColumns etc to work.
NB. setting this will slightly increase your package size on DB2.
The reason for this is that within the Hibernate Tools class,
org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect, calls are made with the column name,
e.g. rs.getString("INDEX_NAME"). DB2 will not provide the column names without
the DESCSTAT setting. i.e. positioning works e.g. rs.getString(3). DB2 calls a packages
SYSIBM.SQLTABLES, SYSIBM.SQLCOLUMNS etc.
Alternately you can implement your own org.hibernate.cfg.reveng.dialect.MetaDataDialect
that works around this limitation.
--
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