Map<String, Ejb3JoinColumn> columnByReferencedName = new HashMap<>(joinColumns.length); for (Ejb3JoinColumn joinColumn : joinColumns) { final String referencedColumnName = joinColumn.getReferencedColumn(); if ( referencedColumnName == null || BinderHelper.isEmptyAnnotationValue( referencedColumnName ) ) { break;
context.getMetadataCollector().getPhysicalColumnName( referencedTable, column1.getReferencedColumn()
Object columnOwner = BinderHelper.findColumnOwner( referencedEntity, columns[0].getReferencedColumn(), context ); throw new MappingException( "Unable to find column with logical name: " + columns[0].getReferencedColumn() + " in " + referencedEntity.getTable() + " and its related " + "supertables and secondary tables" ); String logicalReferencedColumnName = ejb3Column.getReferencedColumn(); if ( StringHelper.isNotEmpty( logicalReferencedColumnName ) ) { String referencedColumnName;
String syntheticPropertyName = propertyNameBuffer.toString(); Object columnOwner = findColumnOwner( ownerEntity, columns[0].getReferencedColumn(), context ); List<Property> properties = findPropertiesByColumns( columnOwner, columns, context ); columnsList.append( "referencedColumnNames(" ); for (Ejb3JoinColumn column : columns) { columnsList.append( column.getReferencedColumn() ).append( ", " );
String referencedColumn = joinCol.getReferencedColumn(); referencedColumn = buildingContext.getMetadataCollector().getPhysicalColumnName( table,
@Override protected void addColumnBinding(SimpleValue value) { if ( StringHelper.isEmpty( mappedBy ) ) { // was the column explicitly quoted in the mapping/annotation // TODO: in metamodel, we need to better split global quoting and explicit quoting w/ respect to logical names boolean isLogicalColumnQuoted = StringHelper.isQuoted( getLogicalColumnName() ); final ObjectNameNormalizer nameNormalizer = getBuildingContext().getObjectNameNormalizer(); final String logicalColumnName = nameNormalizer.normalizeIdentifierQuotingAsString( getLogicalColumnName() ); final String referencedColumn = nameNormalizer.normalizeIdentifierQuotingAsString( getReferencedColumn() ); final String unquotedLogColName = StringHelper.unquote( logicalColumnName ); final String unquotedRefColumn = StringHelper.unquote( referencedColumn ); String logicalCollectionColumnName = StringHelper.isNotEmpty( unquotedLogColName ) ? unquotedLogColName : getPropertyName() + '_' + unquotedRefColumn; logicalCollectionColumnName = getBuildingContext().getMetadataCollector() .getDatabase() .getJdbcEnvironment() .getIdentifierHelper() .toIdentifier( logicalCollectionColumnName, isLogicalColumnQuoted ) .render(); getBuildingContext().getMetadataCollector().addColumnNameBinding( value.getTable(), logicalCollectionColumnName, getMappingColumn() ); } }
mappings.getPhysicalColumnName( column1.getReferencedColumn(), referencedTable ) ); orderedColumns.add( column );
referencedEntity, columns[0].getReferencedColumn(), mappings ); if ( columnOwner == null ) { throw new MappingException( "Unable to find column with logical name: " + columns[0].getReferencedColumn() + " in " + referencedEntity.getTable() + " and its related " + "supertables and secondary tables" ); String logicalReferencedColumnName = ejb3Column.getReferencedColumn(); if ( StringHelper.isNotEmpty( logicalReferencedColumnName ) ) { String referencedColumnName;
String syntheticPropertyName = propertyNameBuffer.toString(); Object columnOwner = findColumnOwner( ownerEntity, columns[0].getReferencedColumn(), mappings ); List<Property> properties = findPropertiesByColumns( columnOwner, columns, mappings ); columnsList.append( "referencedColumnNames(" ); for (Ejb3JoinColumn column : columns) { columnsList.append( column.getReferencedColumn() ).append( ", " );
Map<String, Ejb3JoinColumn> columnByReferencedName = new HashMap<String, Ejb3JoinColumn>(joinColumns.length); for (Ejb3JoinColumn joinColumn : joinColumns) { final String referencedColumnName = joinColumn.getReferencedColumn(); if ( referencedColumnName == null || BinderHelper.isDefault( referencedColumnName ) ) { break;
protected void addColumnBinding(SimpleValue value) { if ( StringHelper.isEmpty( mappedBy ) ) { String unquotedLogColName = StringHelper.unquote( getLogicalColumnName() ); String unquotedRefColumn = StringHelper.unquote( getReferencedColumn() ); String logicalColumnName = getMappings().getNamingStrategy() .logicalCollectionColumnName( unquotedLogColName, getPropertyName(), unquotedRefColumn ); if ( StringHelper.isQuoted( getLogicalColumnName() ) || StringHelper.isQuoted( getLogicalColumnName() ) ) { logicalColumnName = StringHelper.quote( logicalColumnName ); } getMappings().addColumnBinding( logicalColumnName, getMappingColumn(), value.getTable() ); } }
String referencedColumn = joinCol.getReferencedColumn(); referencedColumn = mappings.getPhysicalColumnName( referencedColumn, table );
Column column = new Column( ejb3JoinColumn.getMappedTable().getNameIdentifier(), ejb3JoinColumn.getReferencedColumn(), false );
mappings.getPhysicalColumnName( column1.getReferencedColumn(), referencedTable ) ); orderedColumns.add( column );
Map<String, Ejb3JoinColumn> columnByReferencedName = new HashMap<>(joinColumns.length); for (Ejb3JoinColumn joinColumn : joinColumns) { final String referencedColumnName = joinColumn.getReferencedColumn(); if ( referencedColumnName == null || BinderHelper.isEmptyAnnotationValue( referencedColumnName ) ) { break;
mappings.getPhysicalColumnName( column1.getReferencedColumn(), referencedTable ) ); orderedColumns.add( column );
referencedEntity, columns[0].getReferencedColumn(), mappings ); if ( columnOwner == null ) { throw new MappingException( "Unable to find column with logical name: " + columns[0].getReferencedColumn() + " in " + referencedEntity.getTable() + " and its related " + "supertables and secondary tables" ); String logicalReferencedColumnName = ejb3Column.getReferencedColumn(); if ( StringHelper.isNotEmpty( logicalReferencedColumnName ) ) { String referencedColumnName = null;
protected void addColumnBinding(SimpleValue value) { if ( StringHelper.isEmpty( mappedBy ) ) { String logicalColumnName = getMappings().getNamingStrategy() .logicalCollectionColumnName( getLogicalColumnName(), getPropertyName(), getReferencedColumn() ); getMappings().addColumnBinding( logicalColumnName, getMappingColumn(), value.getTable() ); } }
@Override protected void addColumnBinding(SimpleValue value) { if ( StringHelper.isEmpty( mappedBy ) ) { String unquotedLogColName = StringHelper.unquote( getLogicalColumnName() ); String unquotedRefColumn = StringHelper.unquote( getReferencedColumn() ); String logicalColumnName = getMappings().getNamingStrategy() .logicalCollectionColumnName( unquotedLogColName, getPropertyName(), unquotedRefColumn ); if ( StringHelper.isQuoted( getLogicalColumnName() ) || StringHelper.isQuoted( getLogicalColumnName() ) ) { logicalColumnName = StringHelper.quote( logicalColumnName ); } getMappings().addColumnBinding( logicalColumnName, getMappingColumn(), value.getTable() ); } }
@Override protected void addColumnBinding(SimpleValue value) { if ( StringHelper.isEmpty( mappedBy ) ) { String unquotedLogColName = StringHelper.unquote( getLogicalColumnName() ); String unquotedRefColumn = StringHelper.unquote( getReferencedColumn() ); String logicalColumnName = getMappings().getNamingStrategy() .logicalCollectionColumnName( unquotedLogColName, getPropertyName(), unquotedRefColumn ); if ( StringHelper.isQuoted( getLogicalColumnName() ) || StringHelper.isQuoted( getLogicalColumnName() ) ) { logicalColumnName = StringHelper.quote( logicalColumnName ); } getMappings().addColumnBinding( logicalColumnName, getMappingColumn(), value.getTable() ); } }