MorphOneOrMany
trait MorphOneOrMany
Adapted from october\rain\database\relations\MorphOneOrMany
Traits
Adapted from october\rain\database\relations\DeferOneOrMany
Properties
protected string | $relationName |
Methods
Returns the model query with deferred bindings added
Returns the related "slave id" key in a database friendly format.
Save the supplied related model with deferred binding support.
Create a new instance of this related model with deferred binding support.
Adds a model to this relationship type.
Removes a model from this relationship type.
Details
in
DeferOneOrMany at line 17
Builder
withDeferred($sessionKey)
Returns the model query with deferred bindings added
in
DeferOneOrMany at line 125
protected Expression
getWithDeferredQualifiedKeyName()
Returns the related "slave id" key in a database friendly format.
at line 22
save(Model $model, $sessionKey = null)
Save the supplied related model with deferred binding support.
at line 36
create(array $attributes = [], $sessionKey = null)
Create a new instance of this related model with deferred binding support.
at line 50
add(Model $model, $sessionKey = null)
Adds a model to this relationship type.
at line 75
remove(Model $model, $sessionKey = null)
Removes a model from this relationship type.