[sqlalchemy] Re: single Session, queries against multiple classes issues

2006-12-19 Thread Alan Franzoni
Just a small update. First, my system: Ubuntu Edgy, SQLAlchemy 0.3.3, psycopg 2.0.5, postgres 8.1.4, python2.5. I've realized this issue is highly strange, it seems related to something I can't understand. I'm using a custom metaclass system to map everything from my metadata to objects. If I

[sqlalchemy] Re: Misunderstanding something with autoloading

2006-12-19 Thread Sean Davis
On Tuesday 19 December 2006 05:51, Alan Franzoni wrote: from sqlalchemy import * db = create_engine('postgres://user:[EMAIL PROTECTED]/test5') metadata = BoundMetaData(db) tb = Table('gffdata',metadata,autoload=True) This works fine on my system (ubuntu edgy, x86, python 2.5,

[sqlalchemy] Re: Misunderstanding something with autoloading

2006-12-19 Thread Alan Franzoni
I played a bit more and it happens only with a particular database. When connecting to another database, it seems to work just fine. I'll look into it more here, as it seems to be idiosyncratic. If I come to any hard conclusions, I'll forward them along. By taking a look at the file, I

[sqlalchemy] Re: how to assign values to columns of a mapper?

2006-12-19 Thread Michael Bayer
at this point you need to produce a full example that reproduces your issue. --~--~-~--~~~---~--~~ 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] Re: python ORM

2006-12-19 Thread Ilias Lazaridis
Ο/Η Michael Bayer έγραψε: django was not available to the public until it was fully functional (youd go to the site and just get a coming soon-style splash page)..and even then it was already in production use in earlier forms. they knew that if you release something that wasnt polished and

[sqlalchemy] column_prefix()

2006-12-19 Thread Julien Cigar
Hello, I'm using SQLAlchemy 0.3.1 with Python 2.4 and PostgreSQL I have a strange problem with property(), it seems that they're not propagated to the children classes : Here is the code which fail : File A assign_mapper(session_context, taxonomy.Taxonomy, table_taxonomies,

[sqlalchemy] Re: Misunderstanding something with autoloading

2006-12-19 Thread Michael Bayer
this is a typing error; your PG database is giving richer information for a particular type than the selected SQLAlchemy TypeEngine class expects to receive. as far as what that type is and what the richer information is, youd either have to put some debug print statements on line 385 of

[sqlalchemy] Re: python ORM

2006-12-19 Thread Michael Bayer
after that post, ill never again doubt your trollish reputation. --~--~-~--~~~---~--~~ 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 unsubscribe

[sqlalchemy] Re: single Session, queries against multiple classes issues

2006-12-19 Thread Michael Bayer
im sure if you put a session.clear() in between those two statements then they both would independently work. since the instances() step of a query does not re-instantiate or re-populate instances that are already present in the session, there is probably some difference in loading that is

[sqlalchemy] Re: column_prefix()

2006-12-19 Thread Michael Bayer
yeah the prop on your c instance is going to be called _name in this case. use the synonym() function to put name back on your mapper as a property. http://www.sqlalchemy.org/docs/adv_datamapping.myt#advdatamapping_properties_overriding --~--~-~--~~~---~--~~

[sqlalchemy] Re: python ORM

2006-12-19 Thread Michael Bayer
closing off posting for this thread. --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to

[sqlalchemy] Cascade delete-orphan: child deleted althought still referenced ?

2006-12-19 Thread Nebur
I create a child table and a parent table. The latter holds a relation to the child with delete-orphan cascade. When I delete _the first_ of my 2 parents, the child is immediately deleted, too. *** This is my first attempt to use delete-orphan. I don't dare to report it as a bug, for the case I

[sqlalchemy] Re: Cascade delete-orphan: child deleted althought still referenced ?

2006-12-19 Thread Michael Bayer
the orphan detection only supports one parent at a time. --~--~-~--~~~---~--~~ 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 unsubscribe from this

[sqlalchemy] Re: single Session, queries against multiple classes issues

2006-12-19 Thread Alan Franzoni
Yes, you're right, even tough this doesn't help (I need all objects to be in the same session) and I think I've just found out what raises the problem. The problem is my MapperExtension. I wanted to call __init__ on my instances in order to initialize some meta-properties which work on a

[sqlalchemy] MapperExtension calling __init__ and many-to-many relations problem

2006-12-19 Thread Alan Franzoni
Hello, I'm attaching the test case for this issue. The test case includes some ifs to prevent too many objects to be created and/or to help testing. Unmodified, this will output: [] 0 [] 0 [] 0 just changing the CustomMapperExtension if to False (effectively deleting the create_instance

[sqlalchemy] Re: SQLAlchemy and py2exe problem

2006-12-19 Thread ml
Hi! I had similar problem with module postgres. py2exe didn't automaticaly include the module so I simply put import sqlalchemy.databases.postgres into the main script. Perhaps you should try something like this with the logging. DS Karlo Lozovina píše v Út 19. 12. 2006 v 04:01 +: Hi

[sqlalchemy] Re: MapperExtension calling __init__ and many-to-many relations problem

2006-12-19 Thread Michael Bayer
its a bug, its fixed in r2171. also i can safely say that apparently, almost nobody uses create_instance(), since this bug appears very easily with any kind of lazy or deferred loaders associated with the class. --~--~-~--~~~---~--~~ You received this message