[sqlalchemy] relationship auto update

2014-01-03 Thread pr64
Hi, Newbie question on relationships. Consider the following code. When deleting a child, I would like the parent *.children* attribute to be automatically updated by the orm. It is not : am I doing something wrong or missed some configuration ? Thanks a lot! Pierre #!/usr/bin/env python #

[sqlalchemy] relationship auto updates

2014-01-03 Thread pr64
Hi, Sorry for the previous post. Attached script had a typo. When deleting a child, I would like the children list of the parent to be automatically updated... Am i doing something wrong or missed some configuration ? Please note that i'm using sqa 0.8.4. Thanks Pierre #!/usr/bin/env

[sqlalchemy] Possible bug with Postgres and ILIKE operator?

2014-01-03 Thread Mark Bird
I am using SQLAlchemy 0.8.1 with a Postgres backend, and have noticed that the ilike operator does not seem to be compiling to an ILIKE operator in raw SQL, but instead it is doing lower() on both sides of the comparison: E.g. (names changed to protect the innocent) s = session() print

Re: [sqlalchemy] Possible bug with Postgres and ILIKE operator?

2014-01-03 Thread Michael Bayer
On Jan 3, 2014, at 11:53 AM, Mark Bird mark.a.b...@gmail.com wrote: I am using SQLAlchemy 0.8.1 with a Postgres backend, and have noticed that the ilike operator does not seem to be compiling to an ILIKE operator in raw SQL, but instead it is doing lower() on both sides of the comparison:

Re: [sqlalchemy] relationship auto updates

2014-01-03 Thread Michael Bayer
the behavior here is a product of two things: 1. you’ve disabled expire on commit: expire_on_commit=False 2. the collection is not managed in Python because you are not mutating it, that is you are only saying: session.delete(dan) and not: peter.children.remove(dan)

Re: [sqlalchemy] Possible bug with Postgres and ILIKE operator?

2014-01-03 Thread Mark Bird
Thanks, that's brilliant. Very much obliged for the fast response. I can now resolve an issue as nothing to be done, which is always nice :) On 3 January 2014 18:00, Michael Bayer mike...@zzzcomputing.com wrote: On Jan 3, 2014, at 11:53 AM, Mark Bird mark.a.b...@gmail.com wrote: I am using