[sqlalchemy] Force Load all attributes during a Query

2008-09-29 Thread Harish K Vishwanath
Hello, Is there a way to tell the session to force load all the attributes of an object during a query? (i,e even if it is already present in the Identity Map?). For some reason, auto_expire_on_commit, if set to True is not working well with my app. I always do a session.query(object) before

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-26 Thread Harish K Vishwanath
Try putting the cascade=all, delete, delete-orphan on OneToMany side of the Relationship. On Wed, Aug 27, 2008 at 9:05 AM, Michael Bayer [EMAIL PROTECTED]wrote: On Aug 26, 2008, at 6:08 PM, Alex Mathieu wrote: Let's say I have two classes: class PublicationElement(Entity):

[sqlalchemy] Re: Fwd: Autoexpire on commit is causing problems?

2008-08-25 Thread Harish K Vishwanath
users in the thread, and the below exception occurs randomly during the addition. Any inputs? Thank you so much again! On Mon, Aug 25, 2008 at 8:12 PM, Michael Bayer [EMAIL PROTECTED]wrote: On Aug 25, 2008, at 12:24 AM, Harish K Vishwanath wrote: The line USERIDLIST.append(user.UserID

[sqlalchemy] Re: Fwd: Autoexpire on commit is causing problems?

2008-08-24 Thread Harish K Vishwanath
as tests have not yet been added but your test now passes. On Aug 22, 2008, at 5:51 AM, Harish K Vishwanath wrote: Further to below , if I do : u.id = 9 session.commit() 2008-08-22 15:16:54,066 INFO sqlalchemy.engine.base.Engine.0x..70 UPDATE users S ET id=? WHERE users.id = ? 2008-08

[sqlalchemy] Autoexpire on commit is causing problems?

2008-08-22 Thread Harish K Vishwanath
Hello, I am SQLA 0.5beta4r5051. I am having issues with session having expire_on_commit as True. Below is an example : *File : sqla05betatest.py* from sqlalchemy import create_engine, Table, Column, Integer, String, MetaData from sqlalchemy.orm import mapper, sessionmaker engine =

[sqlalchemy] Fwd: Autoexpire on commit is causing problems?

2008-08-22 Thread Harish K Vishwanath
query seems to work. Does flush internally query and get the object before flushing it to DB which commit() doesn't seem to do? -- Forwarded message -- From: Harish K Vishwanath [EMAIL PROTECTED] Date: Fri, Aug 22, 2008 at 3:02 PM Subject: Autoexpire on commit is causing problems

[sqlalchemy] Re: Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3

2008-08-21 Thread Harish K Vishwanath
. It is not giving any problems with Exceptions class in Py2.4 though. Could this be a possible issue? On Wed, Aug 20, 2008 at 9:28 PM, Michael Bayer [EMAIL PROTECTED]wrote: On Aug 20, 2008, at 11:52 AM, Harish K Vishwanath wrote: Hello, Sorry if I am being stupid. I saw the ticket and r0535 and 537

[sqlalchemy] Could there be a behavioural difference in user defined DataTypes?

2008-08-21 Thread Harish K Vishwanath
Hello, I have a class defining our own data type : class RsiSqliteDateTimeType(types.TypeEngine): def __init__(self): pass def get_col_spec(self): return VARCHAR(35) def convert_bind_param(self, value, engine): if value != None: return

[sqlalchemy] Re: Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3

2008-08-21 Thread Harish K Vishwanath
Thanks Jason. Downloaded R5051, it works fine! Cheers, Harish On Thu, Aug 21, 2008 at 7:58 PM, jason kirtland [EMAIL PROTECTED] wrote: Thanks for the traceback. Give r5050 a try. Cheers, Jason Harish K Vishwanath wrote: Hello Michael, Thanks for your input! I got the latest trunk

[sqlalchemy] Facing Invalid Request Error in 0.5beta4r5051

2008-08-21 Thread Harish K Vishwanath
Hello, I am getting a sa.exc.InvalidRequestError in SALA 0.5beta4, which never happened in SQLA 0.4.6 SQLA 0.4.6 : sqlalchemy.orm.sessionmaker(bind=None, autoflush=False, transactional=True) SQLA 0.5beta4 : sqlalchemy.orm.sessionmaker(bind=None, autoflush=False, autocommit=False) Apart from

[sqlalchemy] Fwd: Facing Invalid Request Error in 0.5beta4r5051

2008-08-21 Thread Harish K Vishwanath
The error goes away when I make the session expire_on_commit=False., But its a nice feature to have, how can I fix the exception below retaining this feature? -- Forwarded message -- From: Harish K Vishwanath [EMAIL PROTECTED] Date: Fri, Aug 22, 2008 at 11:04 AM Subject: Facing

[sqlalchemy] Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3

2008-08-20 Thread Harish K Vishwanath
Hello, I was using elixir 0.5.2 (SQL Alchemy 0.4.6) on Py 2.4. All my model objects inherits from Entity as well as another baseobject specific to our application. class User(elixir.Entity, application.baseobject): ... ... It used to work fine. Today I upgraded to SQLA 0.5 beta3 and elixir

[sqlalchemy] Re: Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3

2008-08-20 Thread Harish K Vishwanath
have no mapper... what it has to do with SA then? On Wednesday 20 August 2008 12:39:15 Harish K Vishwanath wrote: Hello, I was using elixir 0.5.2 (SQL Alchemy 0.4.6) on Py 2.4. All my model objects inherits from Entity as well as another baseobject specific to our application. class

[sqlalchemy] Re: Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3

2008-08-20 Thread Harish K Vishwanath
Hello, Sorry if I am being stupid. I saw the ticket and r0535 and 537 changeset. Which version of SQLA incorporates these changesets? On Wed, Aug 20, 2008 at 7:15 PM, Michael Bayer [EMAIL PROTECTED]wrote: On Aug 20, 2008, at 5:39 AM, Harish K Vishwanath wrote: Hello, I was using elixir