I am currently working with a deep (6-level) joined-subclass hierarchy. Objects are identified with 32-character string UUIDs. However, the SchemaExport tool creates VARCHAR(255) PK columns instead of VARCHAR(32) for some of the classes - specifically, the classes that are at the bottom of the hierarchy.
Looks like the Configuration.secondPassCompileForeignKeys method doesn't properly traverse the foreign key references, and alignColumns() method is not getting called when it should be. My current workaround is to call Configuration.secondPassCompile several times more before generating the schema script.
Hibernate version:3.2.4.SP1
This bug seems to be database-independent - it was reported on MS SQL 2000/2005 and Oracle.
|