Start a new topic

Prefetch / PostFetch not working

 Hi,


i wanna use some code inside the prefetch hook, but it seems to be ignored. (I am using it on the usercollection) - is there any special about this combination?


Neither prefetch, or postfetch are working. PreSave works without any problem.



Help would be great.



I'm using it with titanium /backbone, so i just create a user model and try to fetch it - should work ?!



Best, Nico

Hi Nico,


Kinvey returns a "X-Kinvey-Executed-Collection-Hooks" header as part of the response, containing a string with a comma-separated list of hooksI was able to test this successfully with a sample app by using chrome's postman extension.


Can you look for this header in your response and let me know? Also, please share your kinvey app id which is something like kid_XXXXXX.



Regards,

Wani

Hi Nico,


A couple of questions for you:

  1. Have you tested the hooks after you saved them in the console?
  2. Have you tried fetching the users from API console after adding the hooks? Does that work?
  3. Could you share the use case and code so that I can take a look?

Also, using choice of app framework (Titanium/Backbone.js) shouldn't really affect Business Logic hooks.


Regards,
Wani
Hey,


1. Yes, i'm always saving.
2. Yes, same Result ( Both prefetch and postfetch won't work)
3. I don't think it's rely on the script. Just inserting something like "var logger = 5;" without any response.continue should throw an error (?!) but both scripts are completly ignored ...


Best, Nico





 

Login or Signup to post a comment