CompiledStatement stmt = null;
try {
stmt =
conn.compileStatement("select * from " + TABLE_NAME, StatementType.SELECT, noFieldTypes,
DatabaseConnection.DEFAULT_RESULT_FLAGS);
DatabaseResults results = stmt.runQuery(null);
assertTrue(results.next());
int colNum = results.findColumn(columnName);
Field field = clazz.getDeclaredField(columnName);
FieldType fieldType = FieldType.createFieldType(connectionSource, TABLE_NAME, field, clazz);
Class<?>[] classes = fieldType.getDataPersister().getAssociatedClasses();