Fix for #103 DDL creation doesn't handle nullable attribute of @JoinColumn

This commit is contained in:
Rob Bygrave
2014-05-14 23:21:31 +12:00
parent 44ee64cde5
commit 2055349d76
@@ -107,10 +107,13 @@ public class AnnotationAssocOnes extends AnnotationParser {
BeanTable beanTable = prop.getBeanTable();
JoinColumn joinColumn = get(prop, JoinColumn.class);
if (joinColumn != null) {
prop.getTableJoin().addJoinColumn(false, joinColumn, beanTable);
if (!joinColumn.updatable()){
prop.setDbUpdateable(false);
}
prop.getTableJoin().addJoinColumn(false, joinColumn, beanTable);
if (!joinColumn.updatable()) {
prop.setDbUpdateable(false);
}
if (!joinColumn.nullable()) {
prop.setNullable(false);
}
}
JoinColumns joinColumns = get(prop, JoinColumns.class);