openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <>
Subject RE: Collection (or Map) relationships and null
Date Mon, 11 Dec 2006 22:09:27 GMT
If you have a null indicator for the collection / map field, then
OpenJPA will preserve the null-ness.

Otherwise, the default value will be dictated by what your no-args
constructor does (or, equivalently, what your member field
initializations do).


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: Dain Sundstrom [] 
> Sent: Monday, December 11, 2006 10:53 AM
> To:
> Subject: Collection (or Map) relationships and null
> When I access a collection (or Map) valued relation field when will  
> the field value be null and when won't it be null?  In CMP 2, it was  
> gaurenteed that the field was always non-null, but I'd expect with  
> OpenJPA that it is at least null form new() to em.persist().
> Also, what happens when someone puts a bad value on the Collection  
> (or Map).  For example, a null in the collection, or an entry in the  
> map where the pk doesn't match the bean added.
> -dain

View raw message