@JoinColumn(name = "foo", nullable = false)will not produce a NOT NULL column, but the corresponding below will:@Column(name = "bar", nullable = false)
JoinColumn is missing many properties. This will fix NOT NULL generation for ManyToOne JoinColumns (Apply to AnnotationAssocOnes.java):
--- C:/Users/Sam/AppData/Local/Temp/AnnotationAssocOnes.java-revBASE.svn000.tmp.java Wed Apr 14 22:08:57 2010+++ C:/Users/Sam/src/ebean/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationAssocOnes.java Wed Jun 19 21:24:42 2013@@ -131,6 +131,9 @@ if (!joinColumn.updatable()){ prop.setDbUpdateable(false); }+ if (!joinColumn.nullable()){+ prop.setNullable(false);+ } } JoinColumns joinColumns = get(prop, JoinColumns.class);