-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search by parameter 'q' does not work #220
Comments
I stumbled accross the same problem. It seems the whole search block is broken with Sequelize 4 (I'm on I've tracked the bug down to these lines: epilogue/lib/Controllers/list.js Lines 102 to 105 in d46def3
It appears than nothing is returned by Edit(an hour later) Alright, so @JSProto's assertion was right: symbols don't show up in object keys, meaning the
I'll submit a PR. |
Similar fix may need to appy at this line? epilogue/lib/Controllers/read.js Line 34 in ce700a7
|
and change this line. epilogue/lib/Controllers/read.js Line 29 in ce700a7
I think you need to add a method to util.keys as a replacement for Object.keys, which will return all the object keys as an array. to get the correct size of the object and to iterate these keys. |
Would I just make a new |
I updated the PR. I replaced every call to I ran |
You can use Reflect.ownKeys if exists to get all keys.
you can use this example or similar method in lib/util.js or other place:
|
sorry, I can check test in the evening when I get home. |
I updated the PR with the use of Reflect |
Okay, so we now have 2 PRs:
|
Hi everyone, I am maintaining a new project based off of Epilogue that has full test coverage for Sequelize 4.x.x. I have already merged this and other relevant pull requests from this project. Contributions welcome! |
@tommybananas Will you create a PR? |
Not here, I am already maintaining a Sequelize 4.x compatible version with this fix implemented: |
i have model and resource
I try to make a request
GET /users?q=testuser
to get one item. but I get the whole list.think the mistake is here:
https://github.com/dchester/epilogue/blob/master/lib/Controllers/list.js#L145
variable criteria has one key
{[Symbol (or)]: [{username: [Object]}]}
but
Object.keys(criteria).length
is 0and the condition is not met and
options.where
is not written.test example:
The text was updated successfully, but these errors were encountered: