On May 24, 2013, at 12:34 PM, YKdvd <davidobe...@gmail.com> wrote:

> Yeah, I was afraid of that, but I thought there might be something going on 
> with the relationship layer that might do the knitting.  It would be a 
> constant value (per schema/engine) I could have provided to the engine, 
> metadata, mapper or whatever, but it isn't in the Episode row explicitly.  Oh 
> well,

There's ways to get app-level constant values into relationship.   But if 
there's nothing in the Episode row at all, you aren't actually getting any good 
use from relationship here - you don't need anything about Episode to load it, 
you don't need anything to happen regarding Episode to persist it.  A @property 
that just does a query(Production).get() would work just as well.


> 
> I'll take a look at the docs for whether a @property can handle writable 
> collecitons, but I may just break down and put in that column for a 
> constant-value foreign-key relationship - I wanted to try and backref it to 
> the "Studio.productions" table so that productions loaded from a Production 
> schema have a collection of episodes, if possible.

but....there's no linkage, so Production.episodes would just be, "select * from 
episodes", wouldn't it ?  What row in "episodes" does *not* line up with that 
production row, and why ?  There's nothing in the episode row that tells us 
this, so it's all rows.



-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to