[sqlalchemy] Getting hold of a mapper class from within another mapper class?

2007-05-12 Thread Andreas Jung
I have the following (scary) use-case: Table 'media' has 1 : N relationship to table 'history'. class Media(object): def addHistory(self, comment): self.history.append(History())) Inside addHistory() I need to get hold of the mapper class History for 'history' in order to append

[sqlalchemy] Re: Getting hold of a mapper class from within another mapper class?

2007-05-12 Thread Michael Bayer
On May 12, 2007, at 6:58 AM, Andreas Jung wrote: I have the following (scary) use-case: Table 'media' has 1 : N relationship to table 'history'. class Media(object): def addHistory(self, comment): self.history.append(History())) Inside addHistory() I need to get hold of