Fix where parsing needs to be spread #18
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix-list-where"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Otherwise we get a sequelize options object that looks like
@mdibaiee quick bug fix
Um,
parseWhere
returns a flat object containingkey: value
s of the query, and we set that towhere
, what's wrong with that? I meanparseWhere
doesn't returnwhere: {}
, does it?It actually does return an object with a key of
where
:/It depends on the query parameters it gets, so if you pass it a
where=someJSON
, yes, it returns an object with a keywhere
, but if you just pass plain query parameters, likename=joey
, it will return{ name: 'joey' }
. Am I right?In this case, this patch breaks the
name=joey
style (I actually used this style in my own code, that's why I was surprised 😁).Ah! Understood. I misunderstood how this was supposed to work.
I'll add docs instead :)
Pull request closed