Re: [sqlalchemy] Inexplicable NoResultFound error

2015-08-27 Thread Demitri Muna
Hi, Thanks for the help. On Thursday, August 27, 2015 at 2:23:59 PM UTC-4, Michael Bayer wrote: > > > So, next thing, has anything changed other than database data? versions > of anything? > Really, none that I can think of. It's a production system, so almost no one even has access to change

Re: [sqlalchemy] Map results of a recursive query to proper objects hierarchy

2015-08-27 Thread Mike Bayer
If there were some really nifty and totally extensible way to do it, maybe, though the existing attributes.set_committed_value() hook was added to make this sort of thing even possible at all. On 8/27/15 3:19 PM, alexan...@plav.in wrote: Thanks for this solution! And are there any plans for s

Re: [sqlalchemy] mapper_configured event, class fully configured?

2015-08-27 Thread Douglas Russell
Ok, thanks, that makes sense. Generally everything I see about SQLAlchemy referencing is using backref and it is convenient, but knowing that you actually think back_populates would be your preferred way to implement things is quite nice. I quite prefer that as I think it makes my code much mor

Re: [sqlalchemy] Map results of a recursive query to proper objects hierarchy

2015-08-27 Thread alexander
Thanks for this solution! And are there any plans for sqlalchemy to support such cases in some general sense? четверг, 27 августа 2015 г., 21:48:09 UTC+3 пользователь Michael Bayer написал: > > > > On 8/27/15 2:27 PM, alex...@plav.in wrote: > > Having an adjacency list tree (actually, in my cas

Re: [sqlalchemy] Map results of a recursive query to proper objects hierarchy

2015-08-27 Thread Mike Bayer
On 8/27/15 2:27 PM, alexan...@plav.in wrote: Having an adjacency list tree (actually, in my case it's a DAG) model it's easy to write a recursive CTE which returns a list of the nodes together with their level or path from the root, and applying filters is also no problem. However, I couldn't

[sqlalchemy] Map results of a recursive query to proper objects hierarchy

2015-08-27 Thread alexander
Having an adjacency list tree (actually, in my case it's a DAG) model it's easy to write a recursive CTE which returns a list of the nodes together with their level or path from the root, and applying filters is also no problem. However, I couldn't find in the documentation and previous discuss

Re: [sqlalchemy] Inexplicable NoResultFound error

2015-08-27 Thread Mike Bayer
On 8/27/15 2:12 PM, Demitri Muna wrote: On Thursday, August 27, 2015 at 1:36:46 PM UTC-4, Michael Bayer wrote: have you upgraded cx_Oracle to 5.2 lately? An API change was introduced which corresponds to some users reporting this issue. The issue is fixed for SQLAlchemy 1.0.9.

Re: [sqlalchemy] Inexplicable NoResultFound error

2015-08-27 Thread Demitri Muna
On Thursday, August 27, 2015 at 1:36:46 PM UTC-4, Michael Bayer wrote: > > have you upgraded cx_Oracle to 5.2 lately? An API change was introduced > which corresponds to some users reporting this issue. The issue is fixed > for SQLAlchemy 1.0.9. > No, I'm using PostgreSQL v9.3.9. Sorry, I s

Re: [sqlalchemy] Inexplicable NoResultFound error

2015-08-27 Thread Mike Bayer
On 8/27/15 1:05 PM, Demitri Muna wrote: Hi, I have a script that's basically been running unmodified for years. In it, it performs an SQLAlchemy query that does a simple join between two tables: platePointing = session.query(PlatePointing).join(Plate).filter(Plate.plate_id==plateid).one()

[sqlalchemy] Inexplicable NoResultFound error

2015-08-27 Thread Demitri Muna
Hi, I have a script that's basically been running unmodified for years. In it, it performs an SQLAlchemy query that does a simple join between two tables: platePointing = session.query(PlatePointing).join(Plate).filter(Plate.plate_id==plateid).one() Suddenly, I'm getting a "NoResultFound" erro

Re: [sqlalchemy] Re: polymorphic identity after_delete event

2015-08-27 Thread Jakub Bąk
Those are some great ideas. I will try them out. Thanks Michael! W dniu wtorek, 25 sierpnia 2015 17:16:16 UTC+2 użytkownik Michael Bayer napisał: > > > > On 8/25/15 10:05 AM, Jakub Bąk wrote: > > I just came across a solution to this problem. Adding 'with_polymorphic': > '*' to __mapper_args__ o