Skip to content

Can not add multiple selections as condition on the same column #14

@michal-kusy

Description

@michal-kusy

Example code:

    $q = $db->table('users');
    foreach(array('admin','user') as $role) {
       $q->where('id',
                         $db->table('user_role')
                               ->select('user_id')
                               ->where('role_id',$role));
    }

Example code adds only first selection, because of hash check in SqlBuilder.php line 200. It's because Selection does not have any unique public property and so it's always translated as empty object {} in JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions