Skip to content

Commit

Permalink
Merge pull request #51 from lehminhs/object_bridge_join_exclusive
Browse files Browse the repository at this point in the history
changed joinInner for getBridgeIdBySourceAndOwner to filter by type='object'
  • Loading branch information
lehminhs authored Oct 18, 2022
2 parents 2e7ecbe + 1a1504e commit 9f935e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/DataObject/ClassDefinition/Data/ObjectBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ private function getBridgeIdBySourceAndOwner($object, $bridgeClass, $sourceId)
$db = Db::get();
$select = $db->select()
->from(['dor' => 'object_relations_' . $object::classId()], [])
->joinInner(['dp_objects' => 'object_' . $bridgeClass::classId()], 'dor.dest_id = dp_objects.oo_id', ['oo_id'])
->joinInner(['dp_objects' => 'object_' . $bridgeClass::classId()], 'dor.dest_id = dp_objects.oo_id AND dor.type = "object"', ['oo_id'])
->where('dor.src_id = ?', $object->getId())
->where('dp_objects.' . $this->bridgeField . '__id = ?', $sourceId);

Expand Down

0 comments on commit 9f935e0

Please sign in to comment.