[sqlalchemy] Complex queries and pseudo fields

2012-07-20 Thread Sergey Kucheryavski
Hello, I want to use a table and ORM for keeping and managing tree of static web pages with MPTT approach. The class/table itself is rather simple: class Node(db.Model): __tablename__ = 'node' id = db.Column(db.Integer, primary_key = True) parent_id = db.Column(db.Integer,

Re: [sqlalchemy] Complex queries and pseudo fields

2012-07-20 Thread Michael Bayer
On Jul 20, 2012, at 3:37 AM, Sergey Kucheryavski wrote: Hello, I want to use a table and ORM for keeping and managing tree of static web pages with MPTT approach. The class/table itself is rather simple: class Node(db.Model): __tablename__ = 'node' id = db.Column(db.Integer,

Re: [sqlalchemy] Oracle, version_id_col, and timestamps with time zones

2012-07-20 Thread Tim
The first thing I did after I started having problems was remove the trigger (the above was without the trigger in place). That being said, it appears that I am having trouble with cx_Oracle and not SQLAlchemy. Using cx_Oracle directly, I can select a row by id, getting the timestamp. Then I

Re: [sqlalchemy] Oracle, version_id_col, and timestamps with time zones

2012-07-20 Thread Michael Bayer
On Jul 20, 2012, at 11:19 AM, Tim wrote: The first thing I did after I started having problems was remove the trigger (the above was without the trigger in place). That being said, it appears that I am having trouble with cx_Oracle and not SQLAlchemy. Using cx_Oracle directly, I can

Re: [sqlalchemy] Custom column + AttributeExtension -- Value parameter empty in set() method of the Extension

2012-07-20 Thread Hector Blanco
Yep, you're right... That's exactly what's happening. The set event is, indeed self._values = [] The issue is that I can't upgrade to SqlAlchemy 0.7... Anyway... thank you for the help... I'll have to look for a workaround... 2012/7/9 Michael Bayer mike...@zzzcomputing.com: On Jul 9, 2012, at

Re: [sqlalchemy] Oracle, version_id_col, and timestamps with time zones

2012-07-20 Thread Tim
The microseconds are getting in the way and getting rid of them does work. Unfortunately, the trigger does not get rid of them and there are several applications which write to these tables and depend on the microseconds. It seems to work in cx_Oracle if I call the setinputsizes and use