[storm] (no subject)
shawn bright
nephish at gmail.com
Tue Apr 22 18:25:03 BST 2008
Tim,
Using the unique property to a table column and catching the exception is
what i have been doing for a while now, It works
really well for what i am doing. Hope this helps.
shawn
On Tue, Apr 22, 2008 at 12:03 PM, Jamu Kakar <jamshed.kakar at canonical.com>
wrote:
> Hi Tim,
>
> Tim Moran wrote:
> > I'm wanting to make sure that user_name and email_address are unique for
> > each user. Would the easiest way of doing this be to subclass an
> existing
> > Property class and overide __set__ to add in the validation that way, or
> > is there a simpler way?
>
> Storm doesn't currently provide any functionality to deal with
> unique values in Python code. You'll want to have a UNIQUE
> constraint in your site_user table to ensure that no bad data can
> get into the database and then either catch the exception raised
> when you add a duplicate User or explicitly check for duplicates
> before adding User's to a store.
>
> Thanks,
> J.
>
> --
> storm mailing list
> storm at lists.canonical.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/storm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/storm/attachments/20080422/cb03f70f/attachment-0002.htm
More information about the storm
mailing list