#552 - wrong DDL generation with complex columnDefinition

This commit is contained in:
Robin Bygrave
2016-02-17 20:34:13 +13:00
parent 3130f751f5
commit a22574b0c9
3 changed files with 40 additions and 11 deletions
@@ -1,5 +1,6 @@
package com.avaje.tests.model.zero;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
@@ -11,10 +12,13 @@ public class WithZero {
@Id
long id = 0;
String name = null;
String name;
@ManyToOne
WithZeroParent parent = null;
WithZeroParent parent;
@Column(columnDefinition = "varchar(2) default 'en' not null")
String lang = "en";
@Version
long version = 0;
@@ -35,6 +39,14 @@ public class WithZero {
this.name = name;
}
public String getLang() {
return lang;
}
public void setLang(String lang) {
this.lang = lang;
}
public WithZeroParent getParent() {
return parent;
}