I am trying create a custom logic that it should be execute before updating a field in the data base, most of the things look like it works. No error on Code Runner, properly shown on the console and so on, but when i try to debug it it connects but it never reach the break point. my server code it is as follow
@Overridepublic void beforeUpdate( RunnerContext context, Feed feed ) throws Exception
The feed it is being properly updated, just my custom logic it is never executed.
this is offcouse a simple call that im trying to do, my real goal it is not allow a user to update a “like counter” which is a list of User, unless the change is its own object, so basically i dont want any user to override likes of other users, I also wanted to not retrieve the email on the User object, so the user should not see it.
I meantion this in case there is a better way to do that. But as I mentioned i cannot even start with my own custom logic.
I am using Android library 3.0.20 and Code Runner 3.0.19
Thanks in advance for the help.
Is the Feed class in the custom server code generated by Backendless or you created it by yourself?
Also, could you try updating the feed object using REST Console? (here’s a blog post about REST Console, it shows a GET request, but you’d need to use PUT to update an object):
Thanks for your response, I tried with the rest console, and finally went through the break point.
So i guess it is an issue with the Android Framework. In case it is shouldn’t every call go through the break point anyways?
Thanks in advance.
Could you please provide short sample of code how you update Feed entity?
yeah sure… i am using the save method, from the backendless framework, the update it is not the issue, since it is updating succesfully on the server, the issue, it is that my custom logic it is never beign executed, it is somehow always skipped! But as i mentioned in my last comment, my logic does work with REST.
Backendless.Data.of(Feed.class).save(feed, new AsyncCallback<Feed>()
Should i in this case then create my own rest request on Android so my server code it is executed, or it is there a jar file where this does not happen?