You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Jörg von Frantzius <jo...@artnology.com> on 2005/12/19 17:00:22 UTC
NOT NULL constraints cannot be deferred
Hello,
if I'm not misteaken, it currently is not possible to have checking of
"NOT NULL" constraints be deferred to commit-time. It's possible to have
FK and unique constraints checking deferred, but not "NOT NULL" constraints.
"NOT NULL" constraints can result from primitive types being used, or an
explicit "allows-null" in a column tag. There should be some way to turn
these constraints into deferred constraints as well, IMHO, as any DDL
generated by the implementation needs to be modified by hand in order to
have them deferred.
Regards,
Jörg
--
__________________________________________________________
Dipl.-Inf. Jörg von Frantzius | artnology GmbH
| Milastr. 4
Tel +49 (0)30 4435 099 26 | 10437 Berlin
Fax +49 (0)30 4435 099 99 | http://www.artnology.com
_______________________________|__________________________
Re: NOT NULL constraints cannot be deferred
Posted by Jörg von Frantzius <jo...@artnology.com>.
Hello Craig,
maybe we could have a "deferred-allows-null" attribute in the column
tag? That's where the "allows-null" attribute lives, and there it could
be used to defer any explicit or implicit not-null constraints, e.g. for
primitive number types.
So far, "deferred" only is an attribute of the foreign-key tag and the
unique tag, which both don't apply here.
The rationale behind the naming "deferred-allows-null" would be that
"allows-null" is not a tag of its own right, for which we could define
an unambiguous "deferred" attribute, but it is itself an attribute of
the column tag (which can contain other constraints). So we need to
prefix the new attribute name to make clear what the it refers to.
Another approach could be to turn "allows-null" into a tag of its own
right within the field tag, to make things similar to the existing
"unique" and "foreign-key" tags.
Regards,
Jörg
Craig L Russell wrote:
> Hi Jörg,
>
> I agree.
>
> Currently attribute deferred applies to foreign-key and unique elements.
>
> Can you propose a specific metadata attribute or element that covers
> your use-case?
>
> Regards,
>
> Craig
>
> On Dec 19, 2005, at 8:00 AM, Jörg von Frantzius wrote:
>
>> Hello,
>>
>> if I'm not misteaken, it currently is not possible to have checking
>> of "NOT NULL" constraints be deferred to commit-time. It's possible
>> to have FK and unique constraints checking deferred, but not "NOT
>> NULL" constraints.
>>
>> "NOT NULL" constraints can result from primitive types being used, or
>> an explicit "allows-null" in a column tag. There should be some way
>> to turn these constraints into deferred constraints as well, IMHO, as
>> any DDL generated by the implementation needs to be modified by hand
>> in order to have them deferred.
>>
>> Regards,
>> Jörg
>>
>> --
>> __________________________________________________________
>> Dipl.-Inf. Jörg von Frantzius | artnology GmbH
>> | Milastr. 4
>> Tel +49 (0)30 4435 099 26 | 10437 Berlin
>> Fax +49 (0)30 4435 099 99 | http://www.artnology.com
>> _______________________________|__________________________
>>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>
--
__________________________________________________________
Dipl.-Inf. Jörg von Frantzius | artnology GmbH
| Milastr. 4
Tel +49 (0)30 4435 099 26 | 10437 Berlin
Fax +49 (0)30 4435 099 99 | http://www.artnology.com
_______________________________|__________________________
Re: NOT NULL constraints cannot be deferred
Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Jörg,
I agree.
Currently attribute deferred applies to foreign-key and unique elements.
Can you propose a specific metadata attribute or element that covers
your use-case?
Regards,
Craig
On Dec 19, 2005, at 8:00 AM, Jörg von Frantzius wrote:
> Hello,
>
> if I'm not misteaken, it currently is not possible to have checking
> of "NOT NULL" constraints be deferred to commit-time. It's possible
> to have FK and unique constraints checking deferred, but not "NOT
> NULL" constraints.
>
> "NOT NULL" constraints can result from primitive types being used,
> or an explicit "allows-null" in a column tag. There should be some
> way to turn these constraints into deferred constraints as well,
> IMHO, as any DDL generated by the implementation needs to be
> modified by hand in order to have them deferred.
>
> Regards,
> Jörg
>
> --
> __________________________________________________________
> Dipl.-Inf. Jörg von Frantzius | artnology GmbH
> | Milastr. 4
> Tel +49 (0)30 4435 099 26 | 10437 Berlin
> Fax +49 (0)30 4435 099 99 | http://www.artnology.com
> _______________________________|__________________________
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!