I was looking for the binding between physical and logical column names and I found in class Mappings in method addColumnBinding this code:
Code:
String oldFinalName = (String) binding.logicalToPhysical.put(
logicalName.toLowerCase(),
finalColumn.getQuotedName()
);
...
String oldLogicalName = (String) binding.physicalToLogical.put(
finalColumn.getQuotedName(),
logicalName
);
physicalToLogical shouldn't be the exact mirror of logicalToPhysical? Is this a bug or I misunderstood the meaning of binding?
By the way, what I need is a way to obtain at runtime the name of an hibernate property knowing a column-table pair, is the Mappings class the right way?
Thanks