hasOne() public method

HasOne assumes that the foreignKey will be on the foreignEntity.
public hasOne ( EntityInterface $entity, $foreignEntity, $foreignKey )
$entity EntityInterface
Example #1
0
 public static function relations(Mapper $mapper, Entity $entity)
 {
     return ['search' => $mapper->hasOne($entity, 'SpotTest\\Entity\\Event\\Search', 'event_id')];
 }