openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <>
Subject RE: MappingTool does not create "not null" column for @ManyToOne(optional=false)
Date Fri, 12 Jan 2007 21:00:34 GMT
See if optional is false,
then OpenJPA (not the database) will throw an exception if a null is
specified. This is not propagated to foreign key constraints; those
should be configured via the @ForeignKey annotation, by setting the
updateAction appropriately.


Patrick Linskey
BEA Systems, Inc. 

Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Vlad Tatavu [] 
> Sent: Friday, January 12, 2007 12:44 PM
> To:
> Subject: MappingTool does not create "not null" column for 
> @ManyToOne(optional=false)
> If I use @ManyToOne(optional=false) to annotate an attribute, the 
> MappingTool does not create a NOT NULL column in the 
> corresponding table. 
> Bug?
> Vlad

View raw message