On Wed, 25 Apr 2007 17:29:39 +0400
Oleg Broytmann <[EMAIL PROTECTED]> wrote:

> On Wed, Apr 25, 2007 at 03:15:08PM +0200, Lutz Steinborn wrote:
> > I like to use EnumCol but first I have a question:
> > who did the check if the given value is in the list of possible
> > strings, SQLObject or the database (driver) ?
> 
>    Both.

Thanks for the quick answer.

I've checked col.py to learn how its done and I'm a little bit
confused how complicated its realized.

Is where a special reason why database driven constraints are
used ?

If the list of choices changes you have to update the
constraint check in the db. This isn't funny with production
systems.

Why not using a simple python statement like:
if not value in list_of_choices:
        raise someException

Totally compatible with every database and easy to maintain.

Sorry if i'm asking stupid questions.

Kindly regards

Lutz Steinborn
4c GmbH



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to