orm: Add support for overlay annotations
This is a new concept for many-to-many relationships, where the extra fields from the middle table can be overlaid over the related model using the AnnotatedModel paradigm. The overlaid fields are writable and updates are saved to the middle model. This is performed using a new ::wrap method of the AnnotatedModel class. AnnotatedModel::wrap($what, $overlay, [$class]) Which will create a new class which is a subclass of `$what`, and will have the extra properties in `$overlay` accessible as normal properties. `$overlay` can be an array or a VerySimpleModel instance. The latter is required for writable overlays.
Loading
Please register or sign in to comment