List of usage examples for org.hibernate.boot.model.naming ImplicitBasicColumnNameSource getAttributePath
public AttributePath getAttributePath();
From source file:com.evolveum.midpoint.repo.sql.util.MidPointImplicitNamingStrategy.java
License:Apache License
@Override public Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source) { String columnName = source.getAttributePath().getProperty(); String fullPath = source.getAttributePath().getFullPath(); String result;//from w ww . j av a 2s . c om if (fullPath.startsWith("credentials.") || fullPath.startsWith("activation.")) { //credentials and activation are embedded and doesn't need to be qualified return super.determineBasicColumnName(source); } else { if (fullPath.contains("&&")) { // it's collection result = columnName; } else { result = fullPath.replaceAll("\\.", "_"); } } result = RUtil.fixDBSchemaObjectNameLength(result); Identifier i = toIdentifier(result, source.getBuildingContext()); LOGGER.trace("determineBasicColumnName {} {}", fullPath, i); return i; }