public function getEntitiesByFieldId($fieldId)
    {
        $values = $this->where('field_id', $fieldId)->get();
        if ($values->count()) {
            $object = $values[0];
        } else {
            $object = new self();
        }

        return $object;
    }
public function getEntitiesByFieldId($fieldId)
    {
        $values = $this->where('field_id', $fieldId)->get();
        if ($values->count()) {
            $object = $values[0];
        } else {
            $object = new self();
        }

        return $object;
    }
public function getEntitiesByFieldId ( $ fieldId ) { $ values = $ this -> where ( 'field_id' , $ fieldId ) -> get ( ) ; if ( $ values -> count ( ) ) { $ object = $ values [ 0 ] ; } else { $ object = new self ( ) ; } return $ object ; }
Get entities by fieldID.

@param $fieldId

@return Entity
Get entities by fieldID .