[sqlalchemy] Re: Sql alchemy-Oracle Error

2010-05-19 Thread dhanil anupurath
Hi thanks for the quick reply and pointing me in the right direction. it seems the error is actually related to the operator. is there anything SA can do on this issue? In the meantime i am going to change my query. thanks again.. -- You received this message because you are subscribed to

[sqlalchemy] ConcurrentModificationError: Updated rowcount 0 does not match number of objects updated 1

2010-05-19 Thread jose soares
Hi all, Someone knows what this error mean? ... File /home/ve/sfera/release/sicer/BASE/model/anagraficaAlta/unita_aziendale.py, line 154, in aggiorna_capi_bovini x.flush() File /home/ve/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/sqlalchemy/ext/assignmapper.py, line 20, in

Re: [sqlalchemy] Re: Order of INSERTs for children of an object

2010-05-19 Thread Tomasz Nazar
On Sat, Jan 17, 2009 at 3:40 AM, Michael Bayer mike...@zzzcomputing.com wrote: On Jan 16, 2009, at 6:13 PM, Tomasz Nazar wrote: Do I have control over this behaviour? Or am I doing sth wrong? Thanks for any help..Tomasz you can !   its an exposed internal API but its pretty stable for

[sqlalchemy] CheckConstraint compatibility

2010-05-19 Thread jose soares
Hi all, I have to create a constraint like this: CheckConstraint('data_start = CURRENT_DATE'), it works for PostgreSQL but it doesn't work for Oracle10. Is there some workaround to make it compatible with pg and oracle? j -- You received this message because you are subscribed to the

Re: [sqlalchemy] default value in multiple insert

2010-05-19 Thread Michael Bayer
On May 18, 2010, at 10:06 PM, Dan Kuebrich wrote: My apologies; I expressed my question rather incoherently. if the question is, I want to multiple insert like [{'a':1, 'b':2, 'c':3}, {'a':2}, {'a':3, 'b':4}], etc. only some dictionaries are missing different keys, that is not allowed.

Re: [sqlalchemy] Re: Sql alchemy-Oracle Error

2010-05-19 Thread Michael Bayer
I'm not familiar with the operator in Oracle or its syntax. The first step would be to create a cx_oracle sample script that emits the exact SQL you're looking for. We could then see how to adapt it to SQLAlchemy. On May 19, 2010, at 2:45 AM, dhanil anupurath wrote: Hi thanks for the

[sqlalchemy] Default values not correctly parsed from DB

2010-05-19 Thread Andrew
We're using ORM to do unit testing, so we're mocking up the commit message to do nothing, basically creating a long transaction that's rolled back at the end of the test. However, I am running into the following problem. Assume we've mapped a table to class MyTable with a varchar `name' and a

[sqlalchemy] underscore in mssql column names?

2010-05-19 Thread mte
Hi, I need to connect to an existing MS SQL database with SqlAlchemy. I'm using a declarative_base (haven't tried with manual mapping) and it seems to work except for a few fields. Those are all defined as col1 = Column('some_field_with_underscores_in_name', AnyType) (AnyType meaning Integer,

[sqlalchemy] google groups duplicating emails

2010-05-19 Thread Michael Bayer
If you're experiencing duplicated emails received from the group, others seem to be reporting on this too: http://groups.google.com/group/is-something-broken/browse_thread/thread/58bd16a30c48d35e# http://groups.google.com/group/is-something-broken/browse_thread/thread/9ddcd435f206a3ce# I'm sure

Re: [sqlalchemy] underscore in mssql column names?

2010-05-19 Thread Michael Bayer
there's no issue with underscore column names so something else must be going on. On May 19, 2010, at 7:47 AM, mte wrote: Hi, I need to connect to an existing MS SQL database with SqlAlchemy. I'm using a declarative_base (haven't tried with manual mapping) and it seems to work except for a

Re: [sqlalchemy] underscore in mssql column names?

2010-05-19 Thread Conor
On 05/19/2010 06:47 AM, mte wrote: Hi, I need to connect to an existing MS SQL database with SqlAlchemy. I'm using a declarative_base (haven't tried with manual mapping) and it seems to work except for a few fields. Those are all defined as "col1 =

[sqlalchemy] Re: Default values not correctly parsed from DB

2010-05-19 Thread Andrew
Ah, I understand the reasoning now. Adding the flush in between the delete and add did just the trick; thank you for the explanation, Mike! Andrew On May 19, 10:29 am, Michael Bayer mike...@zzzcomputing.com wrote: On May 19, 2010, at 10:16 AM, Andrew wrote: We're using ORM to do unit

[sqlalchemy] Override onupdate timestamp

2010-05-19 Thread Bryan
I have a table 'table', with a column, 'stamp', that has an onupdate clause onupdate=datetime.now. I am trying to update table.otherColumn, and I don't want table.stamp to be updated with the latest time. I saw one discussion about overriding onupdate here:

[sqlalchemy] Re: Is multi-level polymorphism possible in SQLAlchemy?

2010-05-19 Thread Kiran Jonnalagadda
Thanks. I've got this working now, but am having trouble combining polymorphism and multiple foreign keys to the same table. Here's roughly what I'm doing: class Entity(Base): __tablename__ = 'entities' id = Column(Integer, primary_key=True) # ...bunch of columns... type =

Re: [sqlalchemy] default value in multiple insert

2010-05-19 Thread Dan Kuebrich
Michael--thanks for your help. As you probably guessed, I'm still running 0.5. DEFAULT is, in fact, a valid MySQL keyword, though I didn't know about it before looking into this problem. On Wed, May 19, 2010 at 10:09 AM, Michael Bayer mike...@zzzcomputing.comwrote: On May 18, 2010, at 10:06

[sqlalchemy] post_update fails with backrefs set

2010-05-19 Thread Brad Wells
In upgrading to 0.6.0 I've found a regression in behavior for relationships with backrefs that require post_update=True. from sqlalchemy import Table, Column, Integer, String, MetaData, create_engine, ForeignKey, ForeignKeyConstraint from sqlalchemy.orm import relation, sessionmaker,

Re: [sqlalchemy] post_update fails with backrefs set

2010-05-19 Thread Michael Bayer
that's very likely to be a bug related to the new unit of work. I've added #1807 which is on a high priority 0.6.1 track, will try to get it in before 0.6.1 release. On May 19, 2010, at 3:34 PM, Brad Wells wrote: In upgrading to 0.6.0 I've found a regression in behavior for relationships

Re: [sqlalchemy] CheckConstraint compatibility

2010-05-19 Thread jo
Michael Bayer wrote: On May 19, 2010, at 5:34 AM, jose soares wrote: Hi all, I have to create a constraint like this: CheckConstraint('data_start = CURRENT_DATE'), it works for PostgreSQL but it doesn't work for Oracle10. Is there some workaround to make it compatible with pg and