Apache JDO Project - NOT NULL constraints cannot be deferred

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > December 2005 > NOT NULL constraints cannot be deferred





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author NOT NULL constraints cannot be deferred
Jörg von Frantzius

2005-12-19, 5:45 pm

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 L Russell

2005-12-21, 5:45 pm

Jörg von Frantzius

2005-12-22, 5:45 pm

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:
>
>
> 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
_______________________________|________
__________________


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com