Superb.  Perfect. Thanks

Must go get another coffee before I miss anything else!

On Sep 5, 3:24 pm, "Gaetan de Menten" <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 5, 2008 at 3:13 PM, Dave <[EMAIL PROTECTED]> wrote:
>
> > Hi.
>
> > I have a two unique constraints on a table but I only one of them that
> > I pass ever seems to get picked up.
>
> > Sample query as follows:
>
> > class Stuff(Entity):
>
> >    name = Field(Unicode(100), nullable=False)
> >    terminal = ManyToOne('Terminal',
> >                        column_kwargs={'index':False})
> >    user = ManyToOne('User',
> >                        column_kwargs={'index':False})
>
> >    using_table_options(UniqueConstraint('user_id', 'name'))
> >    using_table_options(UniqueConstraint('terminal_id','name'))
>
> using_table_options(UniqueConstraint('user_id', 'name'),
> UniqueConstraint('user_id', 'name'))
>
> It should work (though I never tried it)
>
> > It seems as if the first constraint is removed when the second is sent
> > through.  I try and pass things through together but I'm unsure of
> > syntax.
>
> > I've been through the documentation on this without too much joy.  I
> > wonder if anyone could assist?...
>
> --
> Gaëtan de Mentenhttp://openhex.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to