#1101 - findNative() on a bean with an associated @OneToOne (with the PK being derived from the parent) maps incorrectly

This commit is contained in:
rob bygrave committed 2017-08-30 21:58:33 +12:00
1 parent 683186cbe9
commit 1d1fde61be
4 files changed
+128 -1

No files matched your search

@@ -713,7 +713,11 @@ public class BeanDescriptor<T> implements MetaBeanInfo, BeanType<T> {
}
void registerColumn(String dbColumn, String path) {
columnPath.put(dbColumn.toLowerCase(), path);
String key = dbColumn.toLowerCase();
// check for clash with imported OneToOne PK
if (!columnPath.containsKey(key)) {
columnPath.put(key, path);
}
}
void registerTable(String baseTable, BeanPropertyAssoc<?> assocProperty) {