Some more info. The problem exactly in _FromElementType.toColumn_s method
That's why SELECT mode works correct - in select-mode we always return_ propertyMapping.toColumns_
if ( fromElement.getWalker().getStatementType() == HqlSqlTokenTypes.SELECT ) {
return propertyMapping.toColumns( tableAlias, path );
}
In INSERT-mode we skip this 'IF' and goes in next 'IF' (as subquery)
if ( fromElement.getWalker().isSubQuery() ) {
if ( isCorrelation() ) {
if ( isMultiTable() ) {
return propertyMapping.toColumns( tableAlias, path );
}
return propertyMapping.toColumns( extractTableName(), path );
}
return propertyMapping.toColumns( tableAlias, path );
}
So INSERT-mode's problem is located in this line return propertyMapping.toColumns( extractTableName(), path ); and wrong point B that we really need real table name
|