[hibernate-issues] [Hibernate-JIRA] Created: (HBX-1131) JDBCReader incorrectly generates bogus FK names
Eric Sirianni (JIRA)
noreply at atlassian.com
Sat Aug 15 14:31:14 EDT 2009
JDBCReader incorrectly generates bogus FK names
-----------------------------------------------
Key: HBX-1131
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131
Project: Hibernate Tools
Issue Type: Bug
Affects Versions: 3.2.4.GA
Environment: Tools 3.2.4 GA
Reporter: Eric Sirianni
Please see my forum post@ https://forum.hibernate.org/viewtopic.php?f=6&t=996016&p=2416464#p2416464
JDBC drivers are allowed to return NULL for the "FK_NAME" metadata field for foreign keys.
In this case, hibernate tries to generate a bogus FK name. This FK name must be unique for the Table otherwise an exception is thrown:
org.hibernate.cfg.JDBCBinderException: Foreign key name (0) mapped to different tables!
Hibernate's algorithm for generating the bogus FK name appears to be wrong. It should increment the bogus FK name for each FK it finds, irrelevant of the "KEY_SEQ" value.
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list