hi there
I have a class tblMembershiptypeTable which I defind using declarative notation

now I wold like to issue a query that returns instances of this class

session.query(tblMembershiptypeTable).filter_by(name=mtype).all()[0]
works as expected.

whereas
t = tblMembershiptypeTable.__table__
mt = session.execute(select(t, t.c.name == mtype)).fetchone()

returns a tuple of values.

how can I use select to return instances?

thanks
robert

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to