[sqlalchemy] Filtering by a foreign key (now, without typo).

2011-02-12 Thread Hector Blanco
Sorry... I just sow a typo: Hello everyone. I am trying to get classes whose foreign key is "whatever" but I always get all the entries in the database, instead of the ones that match the criterion. Let's say I have a couple of classes using declarative base in a relationship N:1. I have that m

[sqlalchemy] Filtering by a foreign key.

2011-02-12 Thread Hector Blanco
Hello everyone. I am trying to get classes whose foreign key is "whatever" but I always get all the entries in the database, instead of the ones that match the criterion. Let's say I have a couple of classes using declarative base in a relationship N:1. I have that modeled like: class OtherClass

Re: [sqlalchemy] SQLAlchemy 0.7 beta 1 released

2011-02-12 Thread Michael Bayer
On Feb 12, 2011, at 8:29 PM, Jon Nelson wrote: > > > On Sat, Feb 12, 2011 at 6:51 PM, Michael Bayer > wrote: > Hey list - > > The first beta release of SQLAlchemy 0.7 is available for download. > > Awesome! I just gave it a test and, except for being bit by the removal of > the _CursorFai

Re: [sqlalchemy] SQLAlchemy 0.7 beta 1 released

2011-02-12 Thread Jon Nelson
On Sat, Feb 12, 2011 at 6:51 PM, Michael Bayer wrote: > Hey list - > > The first beta release of SQLAlchemy 0.7 is available for download. > Awesome! I just gave it a test and, except for being bit by the removal of the _CursorFairy, it appears to work very well! I didn't do any formal check, bu

[sqlalchemy] SQLAlchemy 0.7 beta 1 released

2011-02-12 Thread Michael Bayer
Hey list - The first beta release of SQLAlchemy 0.7 is available for download. 0.7 is the latest iteration of our yearly cycle where each new version brings lots of new features and enhancements, refines APIs and patterns while deprecating others, and removes old APIs that have been depreca

[sqlalchemy] Re: Passing runtime value to relationship join condition

2011-02-12 Thread cd34
uid was the logged in user's id. I didn't grasp the bindparam/ eagerload dependency and almost had that solution working. That wiki page clarified it. As always, thank you for the quick response. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group.

Re: [sqlalchemy] Dynamic relations...

2011-02-12 Thread Michael Bayer
OK I can show you the version of your code that does most of this but there are some fundamental relational misunderstandings in this schema if I am interpreting correctly. Extra: tableid tablename --- - 1 ext1 2 ext1 3 ext2

Re: [sqlalchemy] Passing runtime value to relationship join condition

2011-02-12 Thread Michael Bayer
On Feb 12, 2011, at 2:15 AM, cd34 wrote: > I'm trying to pass a value to a relation at runtime rather than > instantiation time. I've got the callable working with a fixed value, > but, in reading the docs over the last few days , I'm either not > finding the proper incantation or the right term

Re: [sqlalchemy] Dynamic relations...

2011-02-12 Thread Martijn Moeling
One more thing Extra should also be related to other classes, not only ones setup "polymorphic" Like: class dummy(Base): ID = Column (Integer,Primary_key=True) # Set up foreignkey and relation to Extra __table_args__ = (ForeignKeyConstraint

Re: [sqlalchemy] Dynamic relations...

2011-02-12 Thread Martijn Moeling
This whole thing is driving me crazy, What I want: class Extra(Base): __tablename__ = "extra" # Primary key consists of two different columns !!! tableId = Column(Integer, primary_key=true) tablename