Jorge Vargas schrieb: > I'm trying to figure out how things like SAclass.query().something are > setup in TG1, in order to see if it's possible to provide this > functionality for TG2. in which the default is > DBSession.query(SAclass)
As was already answered here, the answer is Session.mapper. However, I don't recommend porting the TG 1 SQLAlchemy setup to TG 2 since it's actually a bit outdated. Instead, TG 2 should adopt the new declarative usage with its simpler mapper, and maybe add some functionality to our own classes. As Mark suggested, we should probably invent a common base class for SQLAlchemy classes in TurboGears. We could then also add some other gimmicks such as jsonification. See also these comments over on the SQLAlchemy list: http://groups.google.com/group/sqlalchemy/browse_thread/thread/bc7ecb50a4ef597c -- Christoph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
