I think that there is a bug.

autoincrement doesn't works with *default=''*

Any solution to this problem?

On Jul 6, 10:46 pm, Kless <[EMAIL PROTECTED]> wrote:
> I'm using so:
> --------
> def Column0(*a, **k):
>     return Column(nullable=False, default='', *a, **k)
>
> groups_table = Table('foo', metadata,
>     Column0('id', Integer, primary_key=True),
>     Column0('bar', Unicode(16)),
> )
> --------
> Note: I'm using SA 0.5 beta.
>
> But well, that solved it. Thank you very much.
>
> On Jul 6, 9:17 pm, [EMAIL PROTECTED] wrote:
>
> > how are u using it? probably u have another default=?
> > or there is a non-keyword/positional argument matching that...
>
> > try something like:
> >  def Column0(*a, **k):
> >      k.setdefault('default', '')        
> >      k.setdefault('nullable', False)    
> >      return Column(*a, **k)
> > thus if u dont specify it explicit, it'll be implicit there.
>
> > > And, why can I add 'default'
> > > ----------
> > > def Column0(*a, **k):
> > >     return Column(nullable=False, default='', *a, **k)
> > > ----------
> > > it shows the next error:
>
> > > TypeError: _FigureVisitName object got multiple values for keyword
> > > argument 'default'
> > > On Jul 6, 7:53 pm, [EMAIL PROTECTED] wrote:
> > > > u can workaround by
> > > > def Column0( *a,**k): return Column( nullable=False, *a,**k)
> > > > and use Column0(...) instead of Column...
>
> > > > On Sunday 06 July 2008 21:53:52 Kless wrote:
> > > > > Is possible create the fields with nullable=False by default?
>
> > > > > It's heavy to have to add this to each field.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to