By default if I create a field in an entity like:
@NotNull
boolean myBoolean;
And I let Hibernate auto-create my tables. What Oracle data type will this map to?
By default if I create a field in an entity like:
@NotNull
boolean myBoolean;
And I let Hibernate auto-create my tables. What Oracle data type will this map to?
This is what you really need
Java POJO:
Oracle DDL
As stated in Hibernate docu
Simply Number(1)
If you want, use SchemaExport to generate a script to your target database. Something like
As @Arthur said it maps to
Number(1)
which would be the standard sql bit where0 == false
and1 == true
. As an alternative you can mapchar(1)
to 'T' or 'F' like thisor map it to 'Y' or 'N'