Re[4]: [Sqlalchemy-users] Many to Many Range Select has Poor Query Values

2006-04-25 Thread Gambit
Hey Mike, Yeah, autoload=True. I've attached the schemas for the relevant tables below, to compare against the ones in the test case. Still running 1333 (haven't svnuped yet) my application code actually crashes when I try to access the variable. I can't get the testcase to reproduce, which is

[Sqlalchemy-users] Re: FYI: Keeping Egg's as Directorys and Not Zips

2006-04-25 Thread Florent Guillaume
Jonathan Ellis wrote: On 4/24/06, Gambit [EMAIL PROTECTED] wrote: As a side note, I always put the revision number (1333, etc) in the version string. This helps me keep track of what version I'm using at any given time, and also makes it easy to roll between discrete versions (instead of

[Sqlalchemy-users] Incredibly simple question

2006-04-25 Thread Jonathan Vanasco
I'm new to ORMs, so please forgive me for this: I've got a few tables where there's an integer column that foreign keys another table for a text value. I'm used to just pre-caching all of the values and doing a lookup like instance_type_id = _dbcache['instance_type']['name'] [

Re: [Sqlalchemy-users] Incredibly simple question

2006-04-25 Thread Gambit
Hey Jonathan, Welcome to ORMs :P I think your basic misunderstanding here is that with an ORM you're going to be mapping columns -- potentially brought together from different tables -- into a single cohesive unit that represents a logical grouping, rather then collapsing everything into a

Re[6]: [Sqlalchemy-users] question about convert_unicode

2006-04-25 Thread Vasily Sulatskov
Hello Jonathan, 2. engine.client_encoding - encoding for client side strings, i.e. string that user feeds to sqlalchemy or gets from it. Defaults to 'ascii', or some other encoding common to most of sqlalchemy users Unnecessary to have a separate SA setting. That's what the locale

Re: Re[4]: [Sqlalchemy-users] Many to Many Range Select has Poor Query Values

2006-04-25 Thread Michael Bayer
gambit - you have a constrcutor that has required arguments. currently, SQLAlchemy uses the __init__ method on your object to create instances as they are loaded from the database, and it calls them with no arguments. so that is the error reprsented in the file you attached. However,

Re: [Sqlalchemy-users] Incredibly simple question

2006-04-25 Thread Jonathan
thanks a lot. i'm used to hand-coded sql. I've already the exact class / mapper structure that you suggested - i figured that out based on the docs. I should have been a bit more clear on this point - I pretty much understand the selecting and pulling data. And I understand the 'simple'

Re[2]: [Sqlalchemy-users] Incredibly simple question

2006-04-25 Thread Gambit
Hey Jonathan, I'm not going to touch the Python-Perl integration part :P But for binding a instance and a type together, generally it's not recommended to use the primary keys. The reason for this is that while it will a) work correctly eventually, and b) be stored correctly in the database,

Re: [Sqlalchemy-users] Left Join's within Mapper are (behaving!)

2006-04-25 Thread Michael Bayer
On Apr 25, 2006, at 1:48 PM, Gambit wrote: Now, I suspect that since I defined the 'data' table with the 'info_pk' column being the primary key for the table, the mapper says hey, no primary key, this ain't valid! at some point and drops the entire record. thats exactly what its

Re: [Sqlalchemy-users] Incredibly simple question

2006-04-25 Thread Jonathan
Hi all, I've done the svn tutorial as suggested + gone through the datamapping / advanced data mapping 3x each. I seem to be ok on the SELECTs with sqlalchemy, but still having trouble with the writes. Specifically I keep running into a wall on this one issue: Going back to my example,

[Sqlalchemy-users] rolling back or committing read-only transactions

2006-04-25 Thread Brad Clements
sorry if this is a faq. I want to use sqlalchemy in a Paste (wsgi) application. For each web request, I need to begin a transaction, then either commit it or rollback depending on wether an exception occurred. I want the begin / commit / rollback will be handled by some wsgi middleware.