Re: [sqlalchemy] Clarification about performance and relation()

2010-03-26 Thread masetto
rom User to Address it is *one to many*" - This is valid only in the bidirectional case or it's "automatic" when i declare somewhere foreign key + relationship() ? - Initially i've defined the foreign key in the PlatformClass and the relation() in the DefinitionClass. Which ty

Re: [sqlalchemy] Clarification about performance and relation()

2010-03-26 Thread masetto
#x27;platform' platformId = Column(Integer, primary_key=True) platform = Column(String) platformId_fk = Column('definitionId_fk', Integer, ForeignKey('definitions.defId')) def setPlatform(self, node): self.platform = node What can i do || correct to

Re: [sqlalchemy] Clarification about performance and relation()

2010-03-25 Thread masetto
>From 30 mins to 2mins... shame :P Thanks Micheal ! Forgive me, what about the other question about foreign keys? On Thu, Mar 25, 2010 at 3:43 PM, Michael Bayer wrote: > masetto wrote: > > Hi all, > > > > i am writing a python script which parse an xml file (python

[sqlalchemy] Clarification about performance and relation()

2010-03-25 Thread masetto
foreign keys." Does this mean that what i've done is correct or i'm a little confused? If i "manually" set a foreign key value, does sqlalchemy understand that a relation between two tables exists? Thanks for your attention. --- Masetto -- You received this messag

Re: [sqlalchemy] Problem with Foreign Key

2010-03-18 Thread masetto
Damn, your're right! Mea culpa :P Thanks! Now it's working again On Thu, Mar 18, 2010 at 6:27 PM, Michael Bayer wrote: > masetto wrote: > > Hi all, > > > > i am new to SQLAlchemy (simply wonderful!), and i'm writing some > > python scripts to do some

[sqlalchemy] Problem with Foreign Key

2010-03-18 Thread masetto
Hi all, i am new to SQLAlchemy (simply wonderful!), and i'm writing some python scripts to do some experiment. I've written a SINGLE python module with two classes which define two different tables (declarative_base) with a simple relationship and a single Foreign Key and everything WORKS fine as