Rejected
Details
Assignee
UnassignedUnassignedReporter
Steven GrimmSteven GrimmComponents
Affects versions
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Steven Grimm
Steven GrimmComponents
Affects versions
Priority
Created May 7, 2005 at 7:46 PM
Updated May 7, 2005 at 8:09 PM
Resolved May 7, 2005 at 7:59 PM
I believe this is the actual problem that the submitter of bug https://hibernate.atlassian.net/browse/HHH-318#icft=HHH-318 was running into: the Hibernate core code appears to call the wrong methods on the NamingStrategy object.
I just wrote a custom strategy and as a test, removed some of the column mappings from my mapping documents. I expected my propertyToColumnName() method to be called for the properties whose column mappings I'd just removed, and my columnName() method to be called on the ones whose mappings were still specified.
Instead, Hibernate called columnName() for all the properties, passing in the mapped column name for those properties that were listed in the mapping document and passing in the raw property name for the unmapped properties.
It appears propertyToColumnName() is never called at all.
Working around this bug is why ImprovedNamingStrategy does its underscore conversion in columnName() and tableName(), which of course it shouldn't have to do since the underscore insertion is a way to map property/class names to columns, not a modification to apply to existing column names. That's the cause of HHH-318.