Bug 138 : DDL generation of Boolean types mapped to Integer and Varchar columns ... and databaseTrueValue
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.1.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
13/08/2009
Updated 
13/08/2009
Type 
Bug
 
Attachments 
No attachments

There are some issues with the DDL generation of Boolean types that are mapped to DB integer or varchar columns.

In addition the databaseTrueValue does not (and should) take precedence over the DatabasePlatform settings.

 
Rob 13 Aug 10:55
Additionally the DDL generation defaulted column lengths

Number(10) and varchar(255) ... instead of Number(1) and varchar(1).

The fix is to add specific column length for the ScalarTypeBoolean.IntBoolean and ScalarTypeBoolean.StringBoolean

Rob 13 Aug 11:14
Also ...

Also adding support for setting databaseBooleanTrue and databasePlatform from ebean.properties

## where "pgtest" is the name of my ebeanServer

ebean.pgtest.databaseBooleanTrue=1
ebean.pgtest.databaseBooleanFalse=0
ebean.pgtest.databasePlatform=com.avaje.ebean.config.dbplatform.Oracle10Platform


Note: these properties are no longer used... (use the ones above instead)

ebean.type.boolean.false=0
ebean.type.boolean.true=1
## use varchar or integer (defaults to varchar)
ebean.type.boolean.dbtype=integer

Rob 13 Aug 12:16
Fixed in HEAD

These are fixed in HEAD now.

woResponse

Upload a file