#1456 - io.ebean.annotation.NotNull not honored by @ManyToOne property

This commit is contained in:
rob bygrave
2018-07-18 19:36:41 +12:00
parent fda930a162
commit 2d44d06f36
4 changed files with 11 additions and 2 deletions
@@ -108,7 +108,6 @@ public class EBasic {
@DbDefault("42")
int newInteger;
@NotNull
@ManyToOne
@DbMigration(preAlter= "insert into migtest_e_user (id) select distinct user_id from migtest_e_basic") // ensure all users exist
EUser user;
@@ -1,5 +1,7 @@
package org.tests.merge;
import io.ebean.annotation.NotNull;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
@@ -12,7 +14,8 @@ public class MContactMessage extends MBase {
private String notes;
@ManyToOne(optional = false)
@NotNull
@ManyToOne
private MContact contact;
public MContactMessage(String title, String subject) {