I have two classes:
class Team(SQLObject):
name = StringCol(length=30)
class Game(SQLObject):
thisTeam = ForeignKey("Team")
otherTeam = StringCol(length=30)
gameDate = DateCol()
What I want to do is delete all the games for a team, from a method
defined in the Team class, sort of like this:
class Team(SQLObject):
name = StringCol(length=30)
def deleteGames(self):
sqlbuilder.Delete(Game, where=(Game.q.thisTeamID == self.id))
I *think* I use sqlbuilder to do this, and this code runs, but the
delete doesn't seem to occur. I've tried adding hub.begin() and
hub.commit() around the Delete statement, but that doesn't seem to
help.
Any suggestions? Is there a better way to do it?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---