Thanks, works perfectly.

On 1 May 2012 15:16, Michael Bayer <mike...@zzzcomputing.com> wrote:

> Since the "uniqueness" makes this kind of a read only thing, I'd use a
> plain @property:
>
> @property
> def unique_tags(self):
>    return set(cat.tag for cat in self.tag_categories)
>
>
> On May 1, 2012, at 10:08 AM, Benjamin Sims wrote:
>
> > Is there an obvious way to set up an association proxy so that it only
> returns distinct objects?
> >
> > For example, if I have:
> >
> > Post - Tag - Tag_Category
> >
> > and would like to access Post.Tag_Categories so that it contains each
> category only once.
> >
> > Any tips appreciated, sure I am missing something obvious here.
> >
> > Ben
> >
> > --
> > 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.
>
> --
> 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.
>
>

-- 
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