Hi. I have a table XYZ. I have a mapping for XYZ (XYZ.java, XYZ.hbm.xml) where I map all of XYZ's columns and where its <id> is a single native ID on the table. I have another mapping called XYZLink.java / XYZLink.hbm.xml where I also map to table XYZ, but this time with a <composite-id> composed of 3 columns from the table.
Now, if I add both XYZ and XYZLink to the configuration, I get an error "Error aligning FK columns, may be ignorable".
Why does the presence of XYZLink seem to cache within Hibernate that the key of this table is the composite key in XYZLink.hbm.xml? I mean, they are two separate classes, two separate mappings... it seems Hibernate is actually storing information about this table using the underlying table name. That doesn't seem right.
If I remove XYZLink.java from the configuration, the error message goes away.
What do you guys think?
|