If database schema is set in naming convention, DDL generation fails due to attempts tocreate a primary key with invalid names. Example:
@Entitypublic class Entry { @Id Long id; String value; // setters, getters etc.}
public class Test { public static void main( String[] args ) { ServerConfig cfg = new ServerConfig(); // .... other settings ... UnderscoreNamingConvention naming = newUnderscoreNamingConvention(); naming.setSchema("foo"); cfg.setNamingConvention( naming ); cfg.setDdlGenerate( true ); cfg.setDdlRun( true ); EbeanServer ebean = EbeanServerFactory.create( cfg ); }}
Generated DDL attempts to create constraint pk_foo.entry instead offoo.pk_entry for table foo.entry:create table foo.entry ( id bigint not null, value varchar(255), constraint pk_foo.entry primary key (id));
create sequence foo.entry_seq;
Fixed in HEAD.