Backendless - 在特定表中保存对象,而不使Java对象的类保持不变

时间:2016-03-12 20:14:52

标签: android backendless

我想创建多个表,我希望能够在其中添加记录而不需要为每个表添加Java对象类。在Parse我可以做

ParseObject gameScore = new ParseObject("GameScore");
gameScore.put("score", 1337);
gameScore.put("playerName", "Sean Plott");
gameScore.put("cheatMode", false);
gameScore.saveInBackground();

我如何使用Backendless做类似的事情?

1 个答案:

答案 0 :(得分:2)

您可以在Backendless中执行此操作(asyncCallback是com.backendless.async.callback.AsyncCallback的实例):

HashMap gameScore = new HashMap();
gameScore.put("score", 1337);
gameScore.put("playerName", "Sean Plott");
gameScore.put("cheatMode", false);
Backendless.Data.of( "GameScore" ).save( gameScore, asyncCallback );