-
Notifications
You must be signed in to change notification settings - Fork 212
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
not taking param into consideration? #67
Comments
Thanks for reporting this @shez1983 ! I'll take a look as soon as I get back to the office on Tuesday. In the mean time, can you provide the SQL representation of both queries? |
i'll make sure I update this post before tuesday.. Thanks :) |
If you are able to, please include the stack trace as well. I do have about 30 minutes to look at it right now, if you are able to update the code :) |
Related or same as #66 |
@shez1983 Are |
I am sorry for the delay... :(
Here is the live Scope
inRandomOrder is an ELOQUENT/Builder function btw.. I am not sure how to include a stack trace because theres no error.. |
@shez1983 thanks for the update. In your eloquent query you aren't specifying |
yes. as i said i can see the actual products.. if i didnt specify get() i wouldnt have come to the conclusion of my OP.. :) |
Hi @shez1983, I am unable to reproduce this problem in version 0.2.37. Can you test again? I have added a test that checks the caching for the See test here: https://github.com/GeneaLabs/laravel-model-caching/blob/master/tests/Unit/CachedModelTest.php#L77 |
@shez1983 closing this for now, please let me know if you continue to have this problem. |
oops sorry - too busy with work will let you know sometime (by next week) btw that link https://github.com/GeneaLabs/laravel-model-caching/blob/master/tests/Unit/CachedModelTest.php#L77 doesnt seem to be working :s |
Thanks for that - seeing your test, it seems you have not understood my problem... in that test i expected you to cache both
and
and then make sure the results are not the same.. notice the Ids.. are different |
Thanks for clarifying, that indeed was not clear in your initial post. I will try to recreate the problem as you just described. |
surely this should assertEMPTY if there can only be one author for a book? and you are not caching the results... you are supposed to be looking at cached results (Unless i am missing something) not comparing eloquent/query results... |
Your original post was saying that running two different queries actually returns the same information. Do I understand that correctly? This test does use caching, and it verifies that the results from each cached query are different. That is to say, that the results provided in Have you actually been able to recreate this issue with the latest version of the package? |
yes thats correct. in your previous test (link you provided: you were doing
so i was expecting something similar in your latest test you did... d003028 anyway i will re-test (i actually tested it again few days after posting to make sure i didnt make an error) & let you know |
Thanks, I look forward to seeing how it works for you! :) |
HI @shez1983, closing this for now. If there are still issues, please go ahead and re-open. Thanks :) |
So I have a query such as this. and i have an api endpoint categories/id/products..
but when i change the id to say 2 or 3.. I get same products.. is this something I have to take care of? or am i doing something wrong?
Environment
Laravel Version: 5.6.2
Laravel Model Caching Package Version: ^0.2.22
PHP Version: * 7.1.6 *
Homestead Version: N/A (using Valet)
Operating System & Version: *Mac OS - El captain - 10.11.6 *
The text was updated successfully, but these errors were encountered: