#107 - Mapping - Add support for @PrimaryKeyJoinColumn/@PrimaryKeyJoinColumns

This commit is contained in:
Rob Bygrave
2018-02-14 22:59:57 +13:00
parent 6db9a60f4f
commit 842292ef6b
13 changed files with 337 additions and 25 deletions
@@ -121,4 +121,13 @@ public class BeanTable {
}
/**
* Return the primary key DB column.
*/
public String getIdColumn() {
if (idProperties.length != 1) {
throw new IllegalStateException("Expecting only one Id column to join to on "+beanType);
}
return idProperties[0].dbColumn;
}
}