Skip to content

Selecting joined attributes by query carrier #162

@matul91

Description

@matul91

The function dataForQuery in the class obo\DataStorage\MySQL filters out the properties which are not associated to the entity. Hence, it is impossible to select properties which belongs to a different table than to table for the entity. This happens if you need to retrieve raw data.

$specification = self::queryCarrier()
            ->select("{id}, {contact}.{name}")
            ->where("AND {contact}.{name} LIKE %~like~", $term);

$data = parent::rawDataForSpecification($specification)

$data will contain only the key id. The key contact.name is missing in the $data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions