[sqlalchemy] Bug with ORM session???

2009-08-06 Thread sagblmi
Hi, I can't figure how that occurs but I'm facing to a stange ?bug?. (I try to write a testcase but without success) After a call to session.query(MClass).get(id), the returned object has all these attributes marked as unloaded If I do a session.refresh(myObject), attributes are correctly

[sqlalchemy] Re: Bug with ORM session???

2009-08-06 Thread sagblmi
at 0xd7bce6c ignored On 6 août, 14:22, sagblmi laurent.mig...@gmail.com wrote: Hi, I can't figure how that occurs but I'm facing to a stange ?bug?.  (I try to write a testcase but without success) After a call to session.query(MClass).get(id), the returned object has all these attributes marked

[sqlalchemy] Re: Bug with ORM session???

2009-08-06 Thread sagblmi
wrote: sagblmi wrote: I don't know if it's relevant with my prob but my application ends with the following errors Exception exceptions.AttributeError: 'NoneType' object has no attribute 'from_attribute' in bound method MutableAttrInstanceState._cleanup

[sqlalchemy] Re: Queries in historical db's, where the join depends on having an overlapping timestamp (or other filter condition)

2009-07-17 Thread sagblmi
Hy, For a long time ago I manage versioned data's into relational database. You must be careful with the way you deal with timeable information. Membership table represent information with a validity period specified by start and stop attribute. The first change that I propose is to replace your

[sqlalchemy] overlaps operator

2009-03-24 Thread sagblmi
Hi, How can I build an ORM query using the sql OVERLAPS operator? The overlaps operator can be expressed with the query: SELECT * FROM PERIOD WHERE (P1_START P2_START AND (P1_START P2_FIN OR P1_FIN P2_FIN)) OR (P2_START P1_START AND (P2_START P1_FIN OR P2_FIN P1_FIN)) OR

[sqlalchemy] speed eficiency

2008-12-17 Thread sagblmi
Hi, A very simple question... Context: * I only need to retrieve values from a table * I've a mapper object for the table Question: In a performance point a view which is the more suitable method: - mappers = session.query(User).filter_by(name='ed').all() or - results =

[sqlalchemy] inconsistent results between 2 testuites executions (SA 0.3.4)

2007-02-06 Thread sagblmi
When I run the testsuite more than once, results are differents. This strange behavior disappear when the the testsuite is launched with python in optimize mode 'python -OO alltest.py' This is particularly true with orm.inheritance5. Very very strange and very blocking since we can't guarantee