OK, so i'm just learning turbogears, and i'm a little new to python, so
bear with me...

I have the following condition, i am creating a database of projects,
and i want to be able to tag them, and then select them by tag.  Here's
my model:

class Project(SQLObject):
        name = StringCol(length=200, alternateID=True, notNone=True)
        description = StringCol()
        tags = RelatedJoin('Tag')

class Tag(SQLObject):
        name = StringCol(length=50, alternateID=True)
        icon_uri = StringCol(length=200)
        projects = RelatedJoin('Tag')

Now, to select all the projects that have a given tag, what i'm doing
is pulling all the projects out of the database and iterating though
them to test if each project contains the tag i'm looking for.

Is there any way to have SQLObject handle this, or will i have to do
this in Python?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to