[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Basic question about 'optional' attribute
|
I have an Entity with some attributes which look like so:
@Basic(optional = false)
private Long X1;
@Basic(optional = false)
private Long Y1;
My persistence.xml has (among other things):
<property name="eclipselink.target-database" value="Oracle"/>
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="sql-script"/>
<property name="eclipselink.application-location" value="C:\ddl"/>
In the create DDL files generated by Eclipselink I am seeing that these columns do not have the NOT NULL constraint on them, rather they look like so:
CREATE TABLE BOX ( ... , X1 NUMBER(19) NULL, Y1 NUMBER(19) NULL, ... )
My understanding of the 'optional' attribute is that it would tell the schema generation process to use NOT NULL so this is surprising to me.
I'm using Eclipselink 2.3.2.v201111250r10461.
-Noah