I have two ODM document One is Item contain
class Items {
/**
* @MongoDB\Field(name="item_name", type="string")
*/
protected $itemName;
}
and another document is
class ItemLocation {
/**
* @var
* @MongoDB\ReferenceOne(targetDocument="Items")
*/
private $item;
/**
* @MongoDB\Field(name="priority", type="integer")
*/
protected $priority;
/**
* @var
* @MongoDB\ReferenceOne(targetDocument="Location")
*/
private $location;
}
How I can get all items left join with item location which is filter by location and order by priority.