Module: events

Functions

decorator (func)

decorator (func)

decorator (func)

decorator (func)

decorator (func)

decorator (func)

reconstructor (fn)

Decorate a method as the 'reconstructor' hook.

Designates a method as the "reconstructor", an __init__-like method that will be called by the ORM after the instance has been loaded from the database or otherwise reconstituted.

The reconstructor will be invoked with no arguments. Scalar (non-collection) database-mapped attributes of the instance will be available for use within the function. Eagerly-loaded collections are generally not yet available and will usually only contain the first element. ORM state changes made to objects at this stage will not be recorded for the next flush() operation, so the activity within a reconstructor should be conservative.