[sqlalchemy] Re: mappers for having problems with associations and flushing

2008-04-14 Thread iain duncan
here are my mappers in case that helps, maybe I don't understand the cascading properly? # relations for the bookings mapper( Booking, booking_table, properties={ 'client': relation( Client ), 'institution': relation( Institution, ), 'category': relation( Category ),

[sqlalchemy] Extension proposal

2008-04-14 Thread Paul Johnston
Hi, I have a utility function that I keep using again and again in my web apps. It takes a nested hash/list structure, something like: data = \ { *'id'*: 123, *'name'*: *'Example customer'*, *'contacts'*: [ {*'id'*:12, name=*'Alice'*} {*'id'*:23, name=*'Bob'*} ] } And it takes

[sqlalchemy] Mapper Issue Upgrading to 0.4.5

2008-04-14 Thread Koen Bok
Hey All, I was upgrading our app from 0.4.1 to 0.4.5 and this code broke: pg_user = Table('pg_user', metadata, Column('usesysid', Integer, primary_key=True), Column('usename', Unicode(), unique=True)) pg_group = Table('pg_group', metadata, Column('grosysid', Integer,

[sqlalchemy] Re: Extension proposal

2008-04-14 Thread Michael Bayer
just two seconds ago someone asked about sticking a JSON plugin in SQLAlchemy (this looks essentially like JSON to me).is the extension proposal something that builds in using MapperExtension ? it seems like people are just looking for json-like functions for things (which is handy,

[sqlalchemy] Re: Mapper Issue Upgrading to 0.4.5

2008-04-14 Thread Michael Bayer
On Apr 14, 2008, at 7:44 AM, Koen Bok wrote: Hey All, I was upgrading our app from 0.4.1 to 0.4.5 and this code broke: pg_user = Table('pg_user', metadata, Column('usesysid', Integer, primary_key=True), Column('usename', Unicode(), unique=True)) pg_group =

[sqlalchemy] Re: Extension proposal

2008-04-14 Thread Paul Johnston
Hi, In my case, the data is coming from FormEncode. I guess it could come from JSON, but that would be JSON client to server, which is not the usual way round. The proposal is for a standalone function, I'm thinking you'd do something like: from sqlalchemy.ext.proc_hash import proc_hash ...

[sqlalchemy] Re: Extension proposal

2008-04-14 Thread Michael Bayer
On Apr 14, 2008, at 10:11 AM, Paul Johnston wrote: Hi, In my case, the data is coming from FormEncode. I guess it could come from JSON, but that would be JSON client to server, which is not the usual way round. JSON is just an object encoding, in my mind it has no implications

[sqlalchemy] Re: Mapper Issue Upgrading to 0.4.5

2008-04-14 Thread Michael Bayer
On Apr 14, 2008, at 7:44 AM, Koen Bok wrote: Hey All, I was upgrading our app from 0.4.1 to 0.4.5 and this code broke: pg_user = Table('pg_user', metadata, Column('usesysid', Integer, primary_key=True), Column('usename', Unicode(), unique=True)) pg_group =

[sqlalchemy] sqlalchemy in virtualenv Instructions

2008-04-14 Thread Lukasz Szybalski
Hello, Below you can find instructions on how to setup sqlalchemy in virtual environment. http://lucasmanual.com/mywiki/TurboGears#head-36fb4094da01b8c28e8bdca803c0f05774eb13b8 Enjoy, Lucas -- Automotive Recall Database. Cars, Trucks, etc. http://www.lucasmanual.com/recall/ Install Broadcom

[sqlalchemy] Re: sqlalchemy in virtualenv Instructions

2008-04-14 Thread jason kirtland
Lukasz Szybalski wrote: Hello, Below you can find instructions on how to setup sqlalchemy in virtual environment. http://lucasmanual.com/mywiki/TurboGears#head-36fb4094da01b8c28e8bdca803c0f05774eb13b8 Installing SQLAlchemy in a virtualenv is the same as for any package on listed on PYPI:

[sqlalchemy] Re: sqlalchemy in virtualenv Instructions

2008-04-14 Thread Lukasz Szybalski
On Mon, Apr 14, 2008 at 11:30 AM, jason kirtland [EMAIL PROTECTED] wrote: Lukasz Szybalski wrote: Hello, Below you can find instructions on how to setup sqlalchemy in virtual environment. http://lucasmanual.com/mywiki/TurboGears#head-36fb4094da01b8c28e8bdca803c0f05774eb13b8

[sqlalchemy] Re: sqlalchemy in virtualenv Instructions

2008-04-14 Thread jason kirtland
Lukasz Szybalski wrote: On Mon, Apr 14, 2008 at 11:30 AM, jason kirtland [EMAIL PROTECTED] wrote: Lukasz Szybalski wrote: Hello, Below you can find instructions on how to setup sqlalchemy in virtual environment.

[sqlalchemy] Re: sqlalchemy in virtualenv Instructions

2008-04-14 Thread Douglas Mayle
Wow, you've been using virtualenv in the most difficult way possible bin/activate is a bash script that sets up you path and all other environment variables you need to use it. running souce bin/ activate (or . bin/activate) causes it to effect the current shell. Just type deactivate when

[sqlalchemy] Re: Extension proposal

2008-04-14 Thread Lele Gaifax
On Mon, 14 Apr 2008 11:49:40 +0100 Paul Johnston [EMAIL PROTECTED] wrote: There's an old version of my code here: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/ProcHash It's an nice function to have around: care to update the version on the wiki? ciao, lele. -- nickname: Lele Gaifax|

[sqlalchemy] Re: sqlalchemy in virtualenv Instructions

2008-04-14 Thread Lukasz Szybalski
On Mon, Apr 14, 2008 at 11:38 AM, jason kirtland [EMAIL PROTECTED] wrote: Lukasz Szybalski wrote: On Mon, Apr 14, 2008 at 11:30 AM, jason kirtland [EMAIL PROTECTED] wrote: Lukasz Szybalski wrote: Hello, Below you can find instructions on how to setup sqlalchemy in virtual

[sqlalchemy] Re: sqlalchemy in virtualenv Instructions

2008-04-14 Thread Douglas Mayle
You shouldn't be mucking about with the PYTHONPATH at all. before installing, activate the venv and ti will just do the right thing... On Apr 14, 2008, at 1:12 PM, Lukasz Szybalski wrote: On Mon, Apr 14, 2008 at 11:38 AM, jason kirtland [EMAIL PROTECTED] wrote: Lukasz Szybalski wrote:

[sqlalchemy] Can you specify Foreign Key Constraint names? (Oracle limit on identifier length causing problems)

2008-04-14 Thread Dr.T
It is possible specify the name of a Foreign Key Constraint generated by a foreign key column specification? Looking at the documentation, the name parameter seems to refer to an existing database FK constraint rather than specifying the name of the generated constraint. (My problem is that I

[sqlalchemy] ConcurrentModificationError with transactional sessions

2008-04-14 Thread Tim Lesher
When I execute this piece of code using a transactional, autoflushing session against SQLite, I get a ConcurrentModificationError on the final select: -- from sqlalchemy import * from sqlalchemy.orm import * eng = create_engine('sqlite://') sm = sessionmaker(autoflush=True,

[sqlalchemy] Re: ConcurrentModificationError with transactional sessions

2008-04-14 Thread Michael Bayer
On Apr 14, 2008, at 2:50 PM, Tim Lesher wrote: Is this a bug, or am I misusing the transactional session? until SQLA 0.4.6 is released including a new option called autosync=True, which we may combine against the other keyword options to just create a single value to set along the

[sqlalchemy] Re: ConcurrentModificationError with transactional sessions

2008-04-14 Thread Tim Lesher
On Apr 14, 3:06 pm, Michael Bayer [EMAIL PROTECTED] wrote: until SQLA 0.4.6 is released including a new option called   autosync=True, which we may combine against the other keyword   options to just create a single value to set along the lines of   transaction_sync='full', the Session

[sqlalchemy] SQLAlchemy questions

2008-04-14 Thread John Sutherland
Hi everyone. My coworkers and I have been working on a homebrew ORM for a year or two now, and we're considering switching to a different one, to cut down on some of the maintenance, and concentrate on our business logic.. Unfortunately, we have a rather old schema that we're locked

[sqlalchemy] Re: Extension proposal

2008-04-14 Thread iain duncan
On Mon, 2008-14-04 at 10:26 -0400, Michael Bayer wrote: On Apr 14, 2008, at 10:11 AM, Paul Johnston wrote: Hi, In my case, the data is coming from FormEncode. I guess it could come from JSON, but that would be JSON client to server, which is not the usual way round. JSON is

[sqlalchemy] Re: Mapper Issue Upgrading to 0.4.5

2008-04-14 Thread Koen Bok
Wow that is fast! Thanks man ;-) On Apr 14, 5:51 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 14, 2008, at 7:44 AM, Koen Bok wrote: Hey All, I was upgrading our app from 0.4.1 to 0.4.5 and this code broke: pg_user = Table('pg_user', metadata,    Column('usesysid', Integer,

[sqlalchemy] Re: SQLAlchemy questions

2008-04-14 Thread Paul Johnston
Hi, I think you'll do well to switch to an open library, I certainly found it worthwhile when I made a similar switch 18 months ago. And that's despite getting side-tracked making SA support MSSQL more completely :-) On you specific points: 1. Be able to call custom functions when a field is

[sqlalchemy] Re: Can you specify Foreign Key Constraint names? (Oracle limit on identifier length causing problems)

2008-04-14 Thread Michael Bayer
On Apr 14, 2008, at 1:54 PM, Dr.T wrote: It is possible specify the name of a Foreign Key Constraint generated by a foreign key column specification? Looking at the documentation, the name parameter seems to refer to an existing database FK constraint rather than specifying the name of

[sqlalchemy] Re: SQLAlchemy questions

2008-04-14 Thread Michael Bayer
On Apr 14, 2008, at 4:46 PM, John Sutherland wrote: 5. We also have a circumstance where we have 2 objects in difference databases that represent the same thing, but have a slightly different schema (someone named one field differently), is it possible to have a single object or table

[sqlalchemy] Re: SQLError: (OperationalError) (2013, 'Lost connection to MySQL server during query')

2008-04-14 Thread DJW
Ross, Any luck with what you were trying... Having a similar problem but with MySQL 5.0.22 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to