My examples I just gave were actually wrong. Let me rewrite them:
*Case 1 (using relationships with composite secondary joins):*
Sub case 1: Given an instance of F, called 'f', perform some action based
on the 'a' property:
if current_user.authorized(f.a):
# do something
Sub case 2: Given
It's more of a convenience thing. I want a nice way to be able to do
something like:
A.fs
or
F.a
For example, if a user is only allowed to modify an F object if they have a
key for the corresponding a object, I'd like to write something like:
if current_user.authorized(F.a):
# do something
Awesome. This was the answer I was really looking for. Thank you.
I'll probably hide the relationship with python for now (I'll look into
association proxies as well) and wait until it's slow enough to bother
anyone before trying to optimize the sql. Trying to use these secondary
composite
Ignore the annotations below the model...those correspond to the actual
names but I forgot to remove them.
On Tuesday, March 24, 2015 at 1:12:24 AM UTC-7, Andrew Millspaugh wrote:
I've got a class hierarchy that looks something like this:
[ A ] 1* [ B ] 1-* [ C ] 1--*