return xdesc;
}
public DirectToFieldMapping buildORFieldMappingFromColumn(DbColumn dbColumn,
RelationalDescriptor desc, NamingConventionTransformer nct) {
DirectToFieldMapping dtfm = new DirectToFieldMapping();
String columnName = dbColumn.getName();
int jdbcType = dbColumn.getJDBCType();
String dmdTypeName = dbColumn.getJDBCTypeName();
Class<?> attributeClass;
if ("CHAR".equalsIgnoreCase(dmdTypeName) && dbColumn.getPrecision() > 1) {
attributeClass = String.class;
}
else {
attributeClass= getClassFromJDBCType(dmdTypeName.toUpperCase(), databasePlatform);
}
dtfm.setAttributeClassificationName(attributeClass.getName());
String fieldName = nct.generateElementAlias(columnName);
dtfm.setAttributeName(fieldName);
DatabaseField databaseField = new DatabaseField(columnName, desc.getTableName());
databaseField.setSqlType(jdbcType);
dtfm.setField(databaseField);
if (nct.getOptimisticLockingField() != null &&
nct.getOptimisticLockingField().equalsIgnoreCase(columnName)) {
desc.useVersionLocking(columnName, false);
}
if (dbColumn.isPK()) {