[sqlalchemy] How to know if a lazy relation isn't loaded yet?

2008-11-03 Thread Joril
Hi everyone! I tried googling but found nothing.. Is there a way to know beforehand whether a relation would be lazy-loaded? For example, given a lazy parent-children relation and an instance X of parent, I'd like to know if X.children is already loaded, without triggering the query. Thanks in

[sqlalchemy] Re: how to execute a scalar function in SQL Server

2008-11-03 Thread Michael Bayer
On Nov 3, 2008, at 5:10 PM, john.goodleaf wrote: I'd like to map to a selectable, but that selectable should contain the result of a scalar function. I'm unsure how best to accomplish it. In raw SQL, I'd write something like: select P.SubjectId, P.SubjectName,