Re: Collection (or Map) relationships and null

2006-12-12 Thread Dain Sundstrom
On Dec 12, 2006, at 1:45 PM, Craig L Russell wrote: There's nothing that I can find in the JPA specification about preserving null vs. empty Collections and Maps. There's no good (practical) way to implement null values for these types in relational databases, which is the target of the

Re: Collection (or Map) relationships and null

2006-12-12 Thread Craig L Russell
Hi Dain, On Dec 12, 2006, at 2:33 PM, Dain Sundstrom wrote: On Dec 12, 2006, at 1:45 PM, Craig L Russell wrote: There's nothing that I can find in the JPA specification about preserving null vs. empty Collections and Maps. There's no good (practical) way to implement null values for these

RE: Collection (or Map) relationships and null

2006-12-11 Thread Patrick Linskey
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 -- Patrick Linskey BEA Systems,

Re: Collection (or Map) relationships and null

2006-12-11 Thread Dain Sundstrom
On Dec 11, 2006, at 2:09 PM, Patrick Linskey wrote: If you have a null indicator for the collection / map field, then OpenJPA will preserve the null-ness. What's that? I see you can specify a column as being not nullable but I don't see anything in the spec about null and collections.

RE: Collection (or Map) relationships and null

2006-12-11 Thread Patrick Linskey
-Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 2:23 PM To: open-jpa-dev@incubator.apache.org Subject: Re: Collection (or Map) relationships and null On Dec 11, 2006, at 2:09 PM, Patrick Linskey wrote: If you have a null

Re: Collection (or Map) relationships and null

2006-12-11 Thread Abe White
1. Loaded instances last stored with a null or empty collection/map are restored with an empty collection/map, period. You can ignore all the talk about null indicators. 2. Instances you construct yourself will maintain their null vs. empty field values at least until persist. Beyond that