Hi all,

Assume that I have this model

class ModelA:
     gender  = Column(Enum('male', 'female', name='gender_type'))

and in another ModelB, I want to reuse this gender_type Enum, how should I 
reuse, because if I write

class ModelB:
     gender = Column(Enum('male', 'female', name='gender_type'))

I will get error about "conflict when creating new Enum type".

I tried this recipe http://techspot.zzzeek.org/2011/01/14/the-enum-recipe/ 
but it seems old and doesn't work: I got warning about null IN-predicate, 
as well as get error 500 when using with Flask-Admin :-(

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to