Like the title says, in debug mode, everything works fine. New rows are created and the app is fine. One I push it to production and disconnect CodeRunner only updating of existing rows works, I cannot create new ones. Is there a permissions thing I am missing?
Ok some things are creating, and others wont update O.o
Darrel, please clarify: is it all right now?
No I am still having problems. Why does it work in Debug and not in Prod?
For example the following code WORKS in debug:
if(enemies_to_battle.size() > 0) {
HashMap n = new HashMap();
n.put("___class", “Battles”);
HashMap new_battle = (HashMap)Backendless.Data.of(“Battles”).save(n);
HashMap[] enemy_array = new HashMap[enemies_to_battle.size()];
//new_battle.setEnemies(enemies_to_battle);
int count = 0;
for(HashMap e : enemies_to_battle) {
e.put(“battle”, new_battle.get(“objectId”));
e.put("___class", “BattleEnemies”);
enemy_array[count] = e;
count++;
}
new_battle.put(“enemies”, enemy_array);
Backendless.Data.of(“Battles”).save(new_battle);
user.setProperty(“battle”, new_battle.get(“objectId”));
Backendless.UserService.update(user);
m_return.put(“battle_init”, true);
}
Same with this… What is wrong with this that it wont save after deploy ment
if(action.contentEquals(“save_modified_location”)) {
to_return = new HashMap();
HashMap new_loc = (HashMap)eventArgs.get("save_location");
System.console().printf("new loc ", "" + new_loc.toString());
if(user_rank.contentEquals("god")) {
new_loc.put("___class", "Locations");
Backendless.Persistence.of("Locations").save(new_loc);
} else {
to_return.put("save_result", false);
}
}
Anyone?
Hi Darrel,
Do you receive an error or something? How do you determine it’s not working?
Also please clarify what exactly you want to accomplish in your code step by step, what handlers do you create, do you have any permissions set. I believe it will help us try to reproduce the error.