[sqlalchemy] Re: How to get list of relations

2007-10-31 Thread Paul Johnston
Hi, You are missing a compile call before you can iterate properties. try adding: Ah, that is indeed the problem. With that in place, iterate_properties does very nearly what I need. The only problem is that I need to get the name of the relation as well. For now, the following works: [(a,b)

[sqlalchemy] REAL columns not reflected with SQLite

2007-10-31 Thread luper rouch
The keyword for floating point columns is REAL according to the SQLite documentation (http://www.sqlite.org/datatype3.html), but only FLOAT is recognized by SQLAlchemy. This patch corrects the problem. --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] r3681/ session.save( smth_persistent) became error?

2007-10-31 Thread svilen
why is this so? i have bunch of objects, and i make them all persistent. then i have another bunch, some of them are noe, other are from above and i want this bunch to also became persistent. (If something there IS already persistent - so what, do nothing) how do i do it now?

[sqlalchemy] Re: Add arbitrary information to some classes

2007-10-31 Thread Paul Johnston
Hi, Ah sure, so it's to be a namespace for namespaces, a shared dict() parking lot. Got it. How about having two dicts? One is purely for user data, libraries and such never touch it. I suggest userdata. The other is for use in extensions and stuff, say extdata. Paul

[sqlalchemy] Re: r3681/ session.save( smth_persistent) became error?

2007-10-31 Thread Michael Bayer
session.save_or_update(obj) On Oct 31, 2007, at 7:29 AM, svilen wrote: why is this so? i have bunch of objects, and i make them all persistent. then i have another bunch, some of them are noe, other are from above and i want this bunch to also became persistent. (If something there IS

[sqlalchemy] Re: r3681/ session.save( smth_persistent) became error?

2007-10-31 Thread Michael Bayer
also am considering taking save()/update()/save_or_update(), which are hibernate terms, into just add(). maybe ill put that in 0.4.1. On Oct 31, 2007, at 7:29 AM, svilen wrote: why is this so? i have bunch of objects, and i make them all persistent. then i have another bunch, some of

[sqlalchemy] Re: r3681/ session.save( smth_persistent) became error?

2007-10-31 Thread svilen
On Wednesday 31 October 2007 17:51:09 Michael Bayer wrote: also am considering taking save()/update()/save_or_update(), which are hibernate terms, into just add(). maybe ill put that in 0.4.1. why not save() - having the 'save_or_update' meaning? would anyone need the new explicit save() -

[sqlalchemy] Re: REAL columns not reflected with SQLite

2007-10-31 Thread Michael Bayer
r3692. On Oct 31, 2007, at 7:24 AM, luper rouch wrote: sqlite-real.diff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To

[sqlalchemy] Updating deferred columns

2007-10-31 Thread Chris M
I have a table with a deferred column. I want to fetch an object from the database and update this column, but have no use for the actual value of it. However, it seems when I change the value of the column it first fetches the value for it and then sets it before doing the update. Is there any

[sqlalchemy] save/update and caching

2007-10-31 Thread klaus
When trying to cache the contents of some small tables, I followed a recipe given by Michael Bayer on this list (at least how I understood it): create a dead session without database connection and move all these objects into it. However, every outside object that references one of these objects

[sqlalchemy] Re: save/update and caching

2007-10-31 Thread Michael Bayer
On Oct 31, 2007, at 12:43 PM, klaus wrote: When trying to cache the contents of some small tables, I followed a recipe given by Michael Bayer on this list (at least how I understood it): create a dead session without database connection and move all these objects into it. However, every

[sqlalchemy] Re: Updating deferred columns

2007-10-31 Thread Michael Bayer
the reason it fetches the existing value is to do a comparison, so it knows whether or not to flush that attribute (or for collections, to determine specifically whats changed). if youre dealing with a relation(), you can use a dynamic relation which will eliminate any loading when

[sqlalchemy] Re: Updating deferred columns

2007-10-31 Thread Michael Bayer
actually, let me think some more about this, i might be able to adjust this behavior for column-based attributes. On Oct 31, 2007, at 2:28 PM, Michael Bayer wrote: the reason it fetches the existing value is to do a comparison, so it knows whether or not to flush that attribute (or for

[sqlalchemy] adding an object through association_proxy

2007-10-31 Thread Matt
Hi all, I have a table (Content) which relates to itself via a many-to-many relationship through a link table (ContentCollection). I'm trying to setup parent/child relationships for the Content table using the association_proxy since there are some fields I'll need to modify in