List of usage examples for org.hibernate.boot.model.naming ImplicitJoinColumnNameSource getEntityNaming
public EntityNaming getEntityNaming();
From source file:com.example.ejb3.auction.NamingStrategy.java
License:Apache License
@Override public Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source) { if (source.getAttributePath() != null) { return toIdentifier((source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION ? addUnderscores(transformEntityName(source.getEntityNaming())) : addUnderscores(source.getAttributePath().getFullPath())) + '_' + source.getReferencedColumnName().getText(), source.getBuildingContext()); }//from w w w . j a v a 2s . co m if (source.getNature() != ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION) { String name = transformEntityName(source.getEntityNaming()) + '_' + source.getReferencedColumnName().getText(); return toIdentifier(addUnderscores(name), source.getBuildingContext()); } return super.determineJoinColumnName(source); }