mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
review changes
This commit is contained in:
+6
-4
@@ -333,16 +333,18 @@ public class PlatformDdl {
|
||||
// e.g. @Column(columnDefinition = "db2;blob(64M);sqlserver,h2;varchar(227);varchar(127)")
|
||||
private String extract(String type) {
|
||||
String[] tmp = type.split(";");
|
||||
assert tmp.length % 2 == 1;
|
||||
for (int i = 0; i < tmp.length - 2; i+=2) {
|
||||
if (tmp.length % 2 == 0) {
|
||||
throw new IllegalArgumentException("You need an odd number of arguments. See Issue #2559 for details");
|
||||
}
|
||||
for (int i = 0; i < tmp.length - 2; i += 2) {
|
||||
String[] platforms = tmp[i].split(",");
|
||||
for (String plat : platforms) {
|
||||
if (platform.isPlatform(Platform.valueOf(plat.toUpperCase(Locale.ENGLISH)))) {
|
||||
return tmp[i+1];
|
||||
return tmp[i + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return tmp[tmp.length-1]; // else
|
||||
return tmp[tmp.length - 1]; // else
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.ebean.annotation.EnumValue;
|
||||
import io.ebean.annotation.Index;
|
||||
import io.ebean.annotation.NotNull;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
@@ -41,6 +42,9 @@ public class EBasic {
|
||||
|
||||
@Size(max=127)
|
||||
String description;
|
||||
|
||||
@Column(columnDefinition = "db2;blob(64M);sqlserver,h2;varchar(227);varchar(127)")
|
||||
String description2;
|
||||
|
||||
Timestamp someDate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user