Added @Index annotation to generate single-column indexes

This commit is contained in:
Rick van Biljouw committed 2014-07-28 18:43:50 +01:00
1 parent 11a6cd04ea
commit 31f56621ff
8 files changed
+246 -94

No files matched your search

@@ -8,21 +8,21 @@ import com.avaje.tests.model.basic.EBasic;
public class MainDdlWithSchema {
public static void main(String[] args) {
public static void main(String[] args) {
ServerConfig cfg = new ServerConfig();
cfg.setName("pg");
cfg.loadFromProperties();
cfg.addClass(EBasic.class);
// .... other settings ...
UnderscoreNamingConvention naming = new UnderscoreNamingConvention();
naming.setSchema("foo");
cfg.setNamingConvention(naming);
cfg.setDdlGenerate(true);
cfg.setDdlRun(true);
EbeanServer ebean = EbeanServerFactory.create(cfg);
//ebean.createSqlUpdate("create schema foo").execute();
System.out.println(ebean);
}
ServerConfig cfg = new ServerConfig();
cfg.setName("h2");
cfg.loadFromProperties();
cfg.addClass(EBasic.class);
// .... other settings ...
//UnderscoreNamingConvention naming = new UnderscoreNamingConvention();
//naming.setSchema("test");
//cfg.setNamingConvention(naming);
cfg.setDdlGenerate(true);
cfg.setDdlRun(true);
EbeanServer ebean = EbeanServerFactory.create(cfg);
//ebean.createSqlUpdate("create schema foo").execute();
System.out.println(ebean);
}
}