On Tue, Aug 28, 2012 at 3:49 PM, Michael Bayer <mike...@zzzcomputing.com>wrote:

> Well, you dug into a really esoteric and complex example there.
>  association_proxy is a much easier way to get around these cases where you
> want an object to act like a scalar, so here's that, without all that crazy
> boilerplate of the "vertical" example, which I'd avoid as it is really too
> complex.
>

Thanks a million for cutting through the confusion on this.  Precisely the
example I've been looking for-- a property that can behave as scalar or a
collection.  If you'd like to update your answer on stackoverflow, I'll
happily accept this example code.


>  Your example seemed undecided about primary key style so I went with the
> composite version.    Surrogate + composite can't be mixed in a single
> table (well it can, but its relationally incorrect.   The key should be the
> smallest unit that identifies a row -
> http://en.wikipedia.org/wiki/Unique_key is a good top level read into
> various subjects regarding this).
>

DB design is fairly new to me-- I've implemented the DB engines, but this
is my first attempt at schema design as well as my first foray into
SQLAlchemy.  Your examples and the docs are very helpful.  Thanks for the
fantastic package!

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to