cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Relationship inspection
Date Sat, 01 Dec 2007 11:52:35 GMT
There's no direct API to achieve that, but you can still figure it  
from mapping metadata. Check whether a DbAttribute on the to-many side  
of the relationship (i.e. the foreign key) allows null. There are a  
few exceptions from this rule [1], but generally this should be an  
indicator of whether a given to-one is optional.

You can get access to the mapping metadata in runtime via  



On Dec 1, 2007, at 3:50 AM, Jean-Fran├žois Smigielski wrote:
> Hello, list!
> I am using Cayenne 3.0M1 on top of a Sun JVM 6.0 (I vote for java  
> 1.5 at
> least support:).
> Is it possible to determine, from the application point of view, if  
> the
> to-one side of a "1-*" relationship accept NULL values?
> -- 
> JF Smigielski

View raw message