Ok, so this looks impossible to me, but it's happening. I figure
people with more experience debugging SA might be able to help.
I've got a generated query (no ORM). I was using 0.3.7 with no
problems, but thought I'd give .4 a try to see if I can take advantage
of performance improvements. From reading the migration documentation
it appeared all I really needed to do was change::
meta = BoundMetaData(engine)
to::
meta = MetaData(engine)
So I did that and now when I run my query now it throws an error::
...
File
"/home/matt/work/vpython/lib/python2.4/site-packages/SQLAlchemy-0.4.0beta5-py2.4.egg/sqlalchemy/engine/base.py",
line 867, in _cursor_execute
raise exceptions.DBAPIError.instance(statement, parameters, e)
sqlalchemy.exceptions.DatabaseError: (DatabaseError) ORA-00932:
inconsistent datatypes: expected NUMBER got CLOB
In my log file, it appears that the statement generated for 0.3.7 and
0.4.0beta5 is the same. The parameters differ a little. One key is
somehow converted (incorrectly) to a float instead of a string (like
it was in 0.3.7). I thought that might be the problem, but that is
the opposite of what the error message is.
So after digging/stepping through SA for a bit (hey, at least I
learned how to use pdb from emacs!), I didn't see anything useful.
Then I tried running the query using only cx_Oracle. I used the same
statement and parameter from the 0.4.beta5 version and lo and behold,
it worked!?!?! (I even changed the parameter that was a float to a
string and it still worked...)
So now I'm just confused. I'm not sure how the same query can work
from straight cx_Oracle, but fails with the _CursorFairy tries to
execute it... Has something/much changed with Oracle since 0.3.7 (I
know it's ~6 months old)? The Changelog [0] lists "oracle
improvements" in beta2, "auto_convert_lobs" in 0.3.9.... Could these
be responsible?
Any hints or suggestions would be great! Thanks much. I'm just
confused right now, and would like to leave that state ;)
-matt
0 - http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/CHANGES
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---