Bmob出现错误“relation className 'goods' not exists.“ 10C

求大神帮帮忙···
Bmob在一对多的数据存储时出现错误“relation className 'goods' not exists.“

和_User表关联正常,与其他表关联就出现改错误,如何处理

public void saveGoods(String goodsId,String userId){
System.out.println("进入saveGoods。。。。。");
User user = new User();
user.setObjectId(userId);
Goods goods = new Goods();
goods.setObjectId(goodsId);
final Car car=new Car();
car.setGoods(goods);
car.setUser(user);
car.save(context,new SaveListener() {
@Override
public void onSuccess() {
Log.i("saveGoods","添加成功:");
}

@Override
public void onFailure(int i, String s) {
Log.i("saveGoods","失败:"+s.toString());
}
});
}

car.setUser(user); 这句话可以存
car.setGoods(goods);这句话报了标题的错误

实体类
public class Car extends BmobObject {

//购物车字段
private Integer car_num;
private User user;
private Goods goods;

public Car() {
this.setTableName("cars");
}

public Integer getCar_num() {
return car_num;
}

public void setCar_num(Integer car_num) {
this.car_num = car_num;
}

public User getUser(){
return user;
}

public void setUser(User user){
this.user=user;
}

public Goods getGoods(){
return goods;
}

public void setGoods(Goods goods){
this.goods=goods;
}

}

数据库已经添加了pointer这个类型

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问