/** * INTERNAL: */ public Vector getOwnedTables() { if ((getMapping() != null) && (getMapping().isReferenceMapping() || getMapping().isStructureMapping())) { return null; } return super.getOwnedTables(); }
/** * INTERNAL: * Find the alias for a given table */ public DatabaseTable aliasForTable(DatabaseTable table) { if (isAttribute() || ((getMapping() != null) && (getMapping().isAggregateObjectMapping() || getMapping().isTransformationMapping()))) { return ((DataExpression)getBaseExpression()).aliasForTable(table); } //"ref" and "structure" mappings, no table printed in the FROM clause, need to get the table alias form the parent table if ((getMapping() != null) && (getMapping().isReferenceMapping() || getMapping().isStructureMapping())) { DatabaseTable alias = getBaseExpression().aliasForTable((DatabaseTable)getMapping().getDescriptor().getTables().firstElement()); alias.setName(alias.getName() + "." + getMapping().getField().getName()); return alias; } return super.aliasForTable(table); }
if ((getMapping() != null) && (getMapping().isReferenceMapping() || getMapping().isStructureMapping())) { normalizer.getStatement().setRequiresAliases(true); return this;