Skip to content

Commit

Permalink
fix: incorrect query plan
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 20, 2024
1 parent 05c5e48 commit 1f08d6e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions persistence/sql/identity/persister_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,9 +923,10 @@ func (p *IdentityPersister) ListIdentities(ctx context.Context, params identity.
`)

wheres += fmt.Sprintf(`
AND ic.nid = ? AND ici.nid = ?
AND ((ic.identity_credential_type_id IN (?, ?, ?) AND ici.identifier %s ?)
OR (ic.identity_credential_type_id IN (?) AND ici.identifier %s ?))
AND ic.nid = ?
AND ici.nid = ?
AND ((ici.identity_credential_type_id IN (?, ?, ?) AND ici.identifier %s ?)
OR (ici.identity_credential_type_id IN (?) AND ici.identifier %s ?))
`, identifierOperator, identifierOperator)
args = append(args,
nid, nid,
Expand Down

0 comments on commit 1f08d6e

Please sign in to comment.