[sqlalchemy] Re: Why can't I add several equal items to list?

2008-09-10 Thread mraer
Thank you, certainly I meant many-to-many relation. In DB I used 3- columns table for association (2 foreign keys and 1 primary). May be the problem was I used secondary-keyword approach. Now I'll try use 3-mappings, to association table too, without using secondary.

[sqlalchemy] Re: Quick way to deep copy an object?

2008-09-10 Thread Tim Jones
Michael, Thanks for your reply. The use case is configuration management. We have complex (SQLAlchemy) objects with many relationships which we wish to up-version, i.e. we want an exact persistent copy (attribute values and relationships) of the original object, but with a different identity,

[sqlalchemy] Re: Quick way to deep copy an object?

2008-09-10 Thread az
this is close to what i have - bitemporal versions of same object. i dont have relation to succesors/predecessor (this is assumed from object_id being same). the practice shows there are attributes - which u dont want to copy at all (dontcopy=list e.g. timestamps), - which u dont want to

[sqlalchemy] Re: multiple statements in a ddl construct

2008-09-10 Thread alex bodnaru
hi jason, after a second thought, i have used your idea for data preloading. it is way more pythonic and portable that ddl. thanks again, alex On Mon, Sep 8, 2008 at 6:45 PM, jason kirtland [EMAIL PROTECTED] wrote: alex bodnaru wrote: hello friends, i wanted to do a few sql commands in a

[sqlalchemy] About the mapping for many to many

2008-09-10 Thread Scripper
I 've created a model with two tables in which the many to many relationship was implemented. Item and Category. I appended two categorys to one item for example. But as i wanted to show the item's attribute category content in the view i got instead some datas below: mosst.model.page.Category

[sqlalchemy] simple Extract, Transform pattern needed

2008-09-10 Thread GHZ
I am thinking about moving from home grown data access classes, to sqlalchemy for a simple ETL tool for moving from legacy databases - at least for the Extract and simplest of Transformations. Example of what I'm trying to achieve.. if I have a customer table in the legacy database, and a

[sqlalchemy] Re: simple Extract, Transform pattern needed

2008-09-10 Thread GHZ
Figured it out. slight issue with documentation confused me http://www.sqlalchemy.org/docs/05/plugins.html#plugins_declarative 'instruments' should read 'descriptor'? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: Quick way to deep copy an object?

2008-09-10 Thread Michael Bayer
On Sep 10, 2008, at 4:39 AM, Tim Jones wrote: Michael, Thanks for your reply. The use case is configuration management. We have complex (SQLAlchemy) objects with many relationships which we wish to up-version, i.e. we want an exact persistent copy (attribute values and

[sqlalchemy] Re: Quick way to deep copy an object?

2008-09-10 Thread az
On Wednesday 10 September 2008 17:59:55 Michael Bayer wrote: On Sep 10, 2008, at 4:39 AM, Tim Jones wrote: Michael, Thanks for your reply. The use case is configuration management. We have complex (SQLAlchemy) objects with many relationships which we wish to up-version, i.e. we

[sqlalchemy] how to undo object setup?

2008-09-10 Thread az
hi is there an official way to undo creation and setup of a complex object? esp. its relations... lets say there is A with references and collections and many2manys. def setup(): my_b = query(B).first() my_X = query(X).first() a = A()#in case of creating_new a.name = 'abc'

[sqlalchemy] Re: Quick way to deep copy an object?

2008-09-10 Thread Tim Jones
Michael, I get the idea thanks. Before I embarked on this - I wanted to check that there was not a simple way that I had overlooked. Thanks for your time. Regards, Tim 2008/9/10 Michael Bayer [EMAIL PROTECTED] On Sep 10, 2008, at 4:39 AM, Tim Jones wrote: Michael, Thanks for your

[sqlalchemy] max_packet_size

2008-09-10 Thread Shawn Lesniak
I was wondering what the maximum size of text or blob objects that sqlalchemy can deal with. The MySQL documents say that the maximum size is determined by the size of the maximum allowed packet on both the client and the server. I know how to configure the server, but I'm not sure what to do

[sqlalchemy] Re: simple Extract, Transform pattern needed

2008-09-10 Thread GHZ
now I have a real question based on example 1 above. i.e. wanting an object with the following attributes: customer.o_cutype customer.id customer.type (converted from cutype through mapping function) from create table old_customer (cunr number, cutype char(1)); The following works: PREFIX

[sqlalchemy] Re: classes and mapper

2008-09-10 Thread Alessandro Dentella
Yep: m = sqlalchemy.orm.class_mapper(User) Thanks a lot! *:-) --~--~-~--~~~---~--~~ 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