Just to be clearer: if I used func.count, the property is correctly set to Intege type. How can I create a column in the mapper and have the column reflect the real type in the db.
I do introspections in columns to prepare the gui to display it and to add filters on that field (http://sqlkit.argolinux.org/sqlkit/ filters.html) and that would help a lot. thanks in advance sandro *:-) On 15 Dic, 19:58, Alessandro Dentella <[email protected]> wrote: > Hi, > > is there a way to set the type of a column added to a mapper with > column_property? > > m = mapper(New, t, properties={ > 'my_bool': column_property( > func.my_bool(t.c.id, type=Boolean) > ) > }) > > func 'my_bool' is a stored procedure on Postgresql and returns a boolean, but > the type of the column is NullType: > > m.get_property('my_bool').columns[0].type > NullType() > > -- > Sandro Dentella *:-)http://sqlkit.argolinux.org SQLkit home page - > PyGTK/python/sqlalchemy -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en.
