Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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