public void appendSize(SQLBuffer sql, Select sel, Joins joins) { DBDictionary dict = field.getMappingRepository().getDBDictionary(); dict.assertSupport(dict.supportsSubselect, "SupportsSubselect"); ClassMapping[] ind = getIndependentElementMappings(false); if (ind != null && ind.length > 1) throw RelationStrategies.unjoinable(field); ForeignKey fk = getJoinForeignKey(); appendJoinCount(sql, sel, joins, dict, field, fk); }
public void appendSize(SQLBuffer sql, Select sel, Joins joins) { DBDictionary dict = field.getMappingRepository().getDBDictionary(); dict.assertSupport(dict.supportsSubselect, "SupportsSubselect"); ClassMapping[] ind = getIndependentElementMappings(false); if (ind != null && ind.length > 1) throw RelationStrategies.unjoinable(field); ForeignKey fk = getJoinForeignKey(); appendJoinCount(sql, sel, joins, dict, field, fk); }
public void appendSize(SQLBuffer sql, Select sel, Joins joins) { DBDictionary dict = field.getMappingRepository().getDBDictionary(); dict.assertSupport(dict.supportsSubselect, "SupportsSubselect"); ClassMapping[] ind = getIndependentElementMappings(false); if (ind != null && ind.length > 1) throw RelationStrategies.unjoinable(field); ForeignKey fk = getJoinForeignKey(); appendJoinCount(sql, sel, joins, dict, field, fk); }
protected void lockJoinTables(List<SQLBuffer> sqls, DBDictionary dict, Object id, ClassMapping mapping, JDBCFetchConfiguration fetch, SQLFactory factory) { FieldMapping[] fms = mapping.getFieldMappings(); for (int i = 0; i < fms.length; i++) { Strategy strat = fms[i].getStrategy(); if (strat instanceof ContainerFieldStrategy) { ForeignKey fk = ((ContainerFieldStrategy)strat).getJoinForeignKey(); Select select = factory.newSelect(); select.select(fk.getColumns()); select.whereForeignKey(fk, id, fms[i].getDefiningMapping(), _store); sqls.add(select.toSelect(true, fetch)); } } }
protected void lockJoinTables(List<SQLBuffer> sqls, DBDictionary dict, Object id, ClassMapping mapping, JDBCFetchConfiguration fetch, SQLFactory factory) { FieldMapping[] fms = mapping.getFieldMappings(); for (int i = 0; i < fms.length; i++) { Strategy strat = fms[i].getStrategy(); if (strat instanceof ContainerFieldStrategy) { ForeignKey fk = ((ContainerFieldStrategy)strat).getJoinForeignKey(); Select select = factory.newSelect(); select.select(fk.getColumns()); select.whereForeignKey(fk, id, fms[i].getDefiningMapping(), _store); sqls.add(select.toSelect(true, fetch)); } } }
protected void lockJoinTables(List<SQLBuffer> sqls, DBDictionary dict, Object id, ClassMapping mapping, JDBCFetchConfiguration fetch, SQLFactory factory) { FieldMapping[] fms = mapping.getFieldMappings(); for (int i = 0; i < fms.length; i++) { Strategy strat = fms[i].getStrategy(); if (strat instanceof ContainerFieldStrategy) { ForeignKey fk = ((ContainerFieldStrategy)strat).getJoinForeignKey(); Select select = factory.newSelect(); select.select(fk.getColumns()); select.whereForeignKey(fk, id, fms[i].getDefiningMapping(), _store); sqls.add(select.toSelect(true, fetch)); } } }
public void appendSize(SQLBuffer sql, Select sel, Joins joins) { DBDictionary dict = field.getMappingRepository().getDBDictionary(); dict.assertSupport(dict.supportsSubselect, "SupportsSubselect"); ClassMapping[] ind = getIndependentElementMappings(false); if (ind != null && ind.length > 1) throw RelationStrategies.unjoinable(field); ForeignKey fk = getJoinForeignKey(); appendJoinCount(sql, sel, joins, dict, field, fk); }
public void appendSize(SQLBuffer sql, Select sel, Joins joins) { DBDictionary dict = field.getMappingRepository().getDBDictionary(); dict.assertSupport(dict.supportsSubselect, "SupportsSubselect"); ClassMapping[] ind = getIndependentElementMappings(false); if (ind != null && ind.length > 1) throw RelationStrategies.unjoinable(field); ForeignKey fk = getJoinForeignKey(); appendJoinCount(sql, sel, joins, dict, field, fk); }
protected void lockJoinTables(List<SQLBuffer> sqls, DBDictionary dict, Object id, ClassMapping mapping, JDBCFetchConfiguration fetch, SQLFactory factory) { FieldMapping[] fms = mapping.getFieldMappings(); for (int i = 0; i < fms.length; i++) { Strategy strat = fms[i].getStrategy(); if (strat instanceof ContainerFieldStrategy) { ForeignKey fk = ((ContainerFieldStrategy)strat).getJoinForeignKey(); Select select = factory.newSelect(); select.select(fk.getColumns()); select.whereForeignKey(fk, id, fms[i].getDefiningMapping(), _store); sqls.add(select.toSelect(true, fetch)); } } }