new HibernateTxFragment() {
protected void txFragment(Session session) throws Exception {
Query query = session.createQuery(" from " + DataSourceColumnEntry.class.getName() + " entry where entry.datasource = :datasource and entry.tableName = :tableName");
query.setString("datasource", datasource);
query.setString("tableName", tableName);
FlushMode oldFlushMode = session.getFlushMode();
session.setFlushMode(FlushMode.NEVER);
query.setCacheable(true);
existingEntries.addAll(query.list());
session.setFlushMode(oldFlushMode);
}