Re: [sqlalchemy] missing types in sqlalchemy.dialects.postgresql

2010-09-11 Thread Michael Bayer
On Sep 11, 2010, at 10:45 AM, Simon Wittber wrote: Is there any reason that the Postgresql geometric types (Point, Polygon etc) are not implemented in the sqlalchemy.dialects.postgresql module? *shrugs*it might be tricky ensuring that return types for all those operations are adequate,

[sqlalchemy] Re: missing types in sqlalchemy.dialects.postgresql

2010-09-11 Thread Simon Wittber
*shrugs*    it might be tricky ensuring that return types for all those operations are adequate, though that might not be necessary assuming psycopg2 does what the end user wants here. My main problem is that table reflection returns the point type as a NullType, and my code needs to know

Re: [sqlalchemy] Re: missing types in sqlalchemy.dialects.postgresql

2010-09-11 Thread Michael Bayer
On Sep 11, 2010, at 11:37 AM, Simon Wittber wrote: its likely since psycopg2 is a pretty complete implementation. that's not to say there arent advantages to having them on your table metadata, though. what are you observing ? When using inspect.get_columns(table_name), I receive this

Re: [sqlalchemy] Re: Loading attributes for Transient objects

2010-09-11 Thread Michael Bayer
On Sep 10, 2010, at 5:16 PM, Kent Bower wrote: Actually, my coworker and I were discussing, if the foreign key is specified, whether transient, pending (with autoflush off), or persistent, you intuitively *expect* that referencing the attribute will load the persistent related object. I

[sqlalchemy] session never saved to db

2010-09-11 Thread Faheem Mitha
Hi, The following session is never saved to the db, not even a schema is created, but a query returns correctly. I assume that there is local caching going on. but session.dirty etc doesn't show anything. So, two questions: First, how (if possible) can I force sqla to hit the db? In this

Re: [sqlalchemy] session never saved to db

2010-09-11 Thread Michael Bayer
On Sep 11, 2010, at 12:59 PM, Faheem Mitha wrote: Hi, The following session is never saved to the db, not even a schema is created, but a query returns correctly. I assume that there is local caching going on. but session.dirty etc doesn't show anything. So, two questions: First,

Re: [sqlalchemy] passive_deletes/updates with sqlite

2010-09-11 Thread alex bodnaru
On 09/11/2010 04:31 AM, alex wrote: On 09/10/2010 05:41 PM, Michael Bayer wrote: On Sep 10, 2010, at 4:13 AM, alex wrote: hello friends, as sqlite has recently introduced support for on delete/update cascade, i'd like to implement the passive_* functionality for this driver too. please

[sqlalchemy] Re: missing types in sqlalchemy.dialects.postgresql

2010-09-11 Thread Simon Wittber
On Sep 12, 12:46 am, Michael Bayer mike...@zzzcomputing.com wrote: OK, sure.   beyond that though do queries with the column and such do whats expected? Just tried this morning, and it works as expected, create / update statements work fine. It seems psycopg2 takes care of everything. -Sw.

[sqlalchemy] Re: add if relationship is involved

2010-09-11 Thread Ernst
Hi, I do not understand the backref bit. With the setup as in the previous reply the Applicant object can use anApplicant._state to get the State object. How can the State object get the related Applicant? Is a change in the mapping needed? aState.applicant (as in backref) leads to File