Method |
Description |
|
breakFormerRelationship ( Relationship $relationship, string $source_id ) |
When adding an entity on a one-to-many relationship, the foreign entity might have had a pre-existing entity
assigned in the inverted 'to-one' index. If it had a value, we now need to break that existing relationship as
we have inadvertently removed it by assigning it to a new local entity. |
|
deleteInvertedRelationship ( Relationship $inverse_relationship, string $foreign_id, string $local_id ) |
Remove the local ID from an inverse relationships and sort indices |
|
deleteRefs ( string $table_name, string $local_id ) |
Remove all references to this entity |
|
deleteRelationshipRefs ( Relationship $relationship, object | object[] $value, string $local_id ) |
Delete all references created by this relationship |
|
deleteRelationshipsTraversal ( Entity $metadata, object $entity, Reader $reader, string $local_id ) |
Traverse the given list of relationships and delete them |
|
getRelationshipDeltas ( string $key, Relationship $relationship, object | object[] $new_value ) : array |
Get an array containing an array of foreign entities to remove the local entity from, and an array of foreign
entities to add the local entity to and an array of entities which remain the same in the relationship |
|
getRelationshipDeltasMulti ( string $key, object | object[] $new_value ) : array |
Get the deltas for a to-many relationship |
|
getRelationshipDeltasSingle ( string $key, object | object[] $new_value ) : array |
Get the deltas for a to-one relationship |
|
persistForwardRelationship ( Relationship $relationship, string $key, object | object[] $value ) |
Persist the forward side of a relationship |
|
persistForwardSortIndices ( Relationship $relationship, string $local_id, object | object[] $value ) |
Persist forward sorted indices |
|
persistInversedRelationship ( Relationship $relationship, string $key, object | object[] $value, string $local_id, Reader $reader ) |
Persist the inverse side of a relationship |
|
persistRefs ( Relationship $relationship, string $key, object | object[] $value, string $local_id ) |
Persist refs in place of inverted indices |
|
persistRelationshipsTraversal ( Entity $metadata, object $entity, Reader $reader, string $local_id ) |
Traverse an array of relationships and persist them |
|
setMultiValueRelationship ( string $key, object[] | null $foreign_entities ) |
Set a forward multi-value relationship index |
|
setSingleValueRelationship ( string $key, object $foreign_entity ) |
Set a single-key relationship index |
|
updateMaintainedRelationshipSortIndices ( Relationship $inverse_relationship, string[] $maintain, Reader $reader, string $local_id ) |
Re-test and update inverted sort-by columns for maintained relationship entities |
|
updateRefs ( string $table_name, string $local_id, Reader $reader ) |
Update references to this entity (such as conditional sort indices) |
|