I'm attaching the sql that gets generated. As you can see the EVNT_TYP_ID number(19,0) is NOT set to 'not null'.
I was expecting something like this: EVNT_TYP_ID number(19,0) not null, since I defined the mapping as
<many-to-one name="eventType" class="com.demo.EventType" not-null="true">.
Is there anything else I need to set, or is this a bug?
[schemaexport] alter table EVENT drop constraint FK3F47A7AAADFC277;
[schemaexport] drop table EVENT cascade constraints;
[schemaexport] drop table EVNT_TYP cascade constraints;
[schemaexport] drop sequence hibernate_sequence;
[schemaexport] create table EVENT (
[schemaexport] EVNT_ID number(19,0) not null,
[schemaexport] EVNT_TITLE varchar2(255) not null,
[schemaexport] EVNT_TYP_ID number(19,0),
[schemaexport] primary key (EVNT_ID)
[schemaexport] );
[schemaexport] create table EVNT_TYP (
[schemaexport] EVNT_TYP_ID number(19,0) not null,
[schemaexport] EVNT_TYP_NME varchar2(255) not null unique,
[schemaexport] primary key (EVNT_TYP_ID)
[schemaexport] );
[schemaexport] alter table EVENT add constraint FK3F47A7AAADFC277 foreign key (EVNT_TYP_ID) references EVNT_TYP;
|