notional
notional copied to clipboard
Late binding of session to custom ORM pages is broken.
Currently, sessions must be bound to a ConnectedPage prior to defining custom types.
CustomPage = connected_page()
def Animal(CustomPage):
# ORM properties
def main():
notion = notional.connect(auth=auth_token)
CustomPage.bind(notion)
# at this point, the session in Animal is None
More specifically, to support late binding each subclass must bind to the session rather than the base class. Ideally, once the base class is bound, all subclasses should inherit the session.