openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: MappingTool does not create "not null" column for @ManyToOne(optional=false)
Date Fri, 12 Jan 2007 21:00:34 GMT
See AnnotationPersistenceMetaDataParser.java:1201: 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

-- 
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 [mailto:vtatavu@ca.ibm.com] 
> Sent: Friday, January 12, 2007 12:44 PM
> To: open-jpa-dev@incubator.apache.org
> 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
> 

Mime
View raw message