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 a new items to the media's history.

Unfortunately the complete mappers are hidden behind a wrapper and the mappers are only available to the application through a dedicated getMapper() call returning a registered mapper by name. However the wrapper instance
is not available to the Media mapper itself. Is there a way to get hold
of depending mapper classes - in this case the History mapper - directly
from the Media mapper class (since it knows that it depends on the History
mapper)?

Andreas

Attachment: pgpXBK8hyHyTr.pgp
Description: PGP signature

Reply via email to