Hi,
can anybody please check this:
I have some script using SA and somewhere in the script I call
sess.merge(obj) and got this error:
'DynamicAttributeImpl' object has no attribute 'accepts_scalar_loader'
I don't understand fully what 'accepts_scalar_loader' is, but, I tried
to add this to
sandro dentella ha scritto:
Hi,
in a doctest I have::
str(q) == str(query.filter(User.first_name == 'ed'))
True
that works but the following fails,
(both where built starting from the same session.query(User)
q == query.filter(User.first_name == 'ed')
in another place comparing str fails just because a join has ON join
condition inverted (but semantically equivalent). What's the correct
way to test if two queries are semantically equivalent?
Thanks
sandro
*:-)
Hi sandro, did you want to compare
this could be a bug, depending on if we have test coverage for
session.merge() in conjunction with dynamic relations. can you
reproduce this against the latest 0.5.0rc4 or 0.4.8 release, and if so
can you make a short test case ?
On Dec 1, 2008, at 6:43 AM, Nabla wrote:
Hi,
can
When using SQLAlchemy SQL Expressions, what's the appropriate syntax
for doing a left join on a sub-query so that you can select results
from the sub-query and include them in the results for the main query
e.g.:
SELECT organization.name, email_address.email,
FROM organization
LEFT JOIN (
the subquery is created first as its own object, which then gains its
own .c. attribute. the only thorny aspect is the correlate(None)
which disables the inner 'organization' from correlating to the outer
one.
from sqlalchemy import select
from sqlalchemy.sql import table, column