I'm using the Enum recipe from http://techspot.zzzeek.org/2011/01/14/the-enum-recipe/
I have a class mapped to table which has a single enum column as its primary key. Querying using EnumSymbol instances for the column values mostly works fine. However, If I use Query.get(pk_val) where "pk_val" is an EnumSymbol instance, I get "InvalidRequestError: Incorrect number of values in identifier to formulate primary key for query.get()...". Digging into SQLAlchemy, I figured out that the problem is that EnumSymbol is iterable, confusing util.to_list(), which is used by Query.get(). I don't need EnumSymbols to be iterable so I'll just remove the __iter__ method. I'm not sure if this should be considered a bug in the recipe. -- 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 https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.