update data relation

how to update data relation?
example i have class ItemData, have one to many relationship to PrivacyData class
now i want to set data to item data like this
privacyData=new PrivacyData();
Backendless.Persistence.of(ItemData.class).find(new AsyncCallback<BackendlessCollection<ItemData>>() {
public void handleResponse(BackendlessCollection<ItemData> response) {
Log.v(“get item”,“sukses”);
final ItemData itemDataEdit=response.getCurrentPage().get(0);
Backendless.Persistence.save(itemDataEdit, new AsyncCallback<ItemData>() {
public void handleResponse(ItemData response) {
Log.v(“update item priv”,“sukses”);
public void handleFault(BackendlessFault fault) {
Log.v(“update item priv”,fault.getMessage());

public void handleFault(BackendlessFault fault) {
Log.v(“get item”,fault.getMessage());

but i got error “Unable to adapt array to data type: class com.example.vayne.snapit.Model.PrivacyData”

Can you show your ItemData class? (PrivacyData field with getter and setter)
In web console for ItemData table PrivacyData field “autoload” property is checked?

Nvm i use another method to solve this.

What the another method?

I dont use the relationship. So i make 2 diff table. I dont know whats wrong, i can update data that have 1 to 1 relation, but cant update 1 to many relation

But how your ItemData class looks like? I’m not sure that problem in relation, but it’s may be. Also problem may be with your class definition.

I will send it later. Not hving access to my pc atm

public class ItemData implements Serializable{
private String email;
private String itemId;
private String item_category;
private String image_url;
private String video_url;
private String item_name;
private String item_expire_date;
private String item_detail;
private String item_security_code;
private String added_time;
private String loaned_status;
private String expire_date_status;
private String qr_code_status;
private PrivacyData privacyData;;

public String getEmail() {
    return email;

public void setEmail(String email) {
    this.email = email;

public String getItemId() {
    return itemId;

public void setItemId(String itemId) {
    this.itemId = itemId;

public String getItem_category() {
    return item_category;

public void setItem_category(String item_category) {
    this.item_category = item_category;

public String getItem_expire_date() {
    return item_expire_date;

public void setItem_expire_date(String item_expire_date) {
    this.item_expire_date = item_expire_date;

public String getAdded_time() {
    return added_time;

public void setAdded_time(String added_time) {
    this.added_time = added_time;

public String getItem_name() {
    return item_name;

public void setItem_name(String item_name) {
    this.item_name = item_name;

public String getImage_url() {
    return image_url;

public void setImage_url(String image_url) {
    this.image_url = image_url;

public String getVideo_url() {
    return video_url;

public void setVideo_url(String video_url) {
    this.video_url = video_url;

public String getItem_detail() {
    return item_detail;

public void setItem_detail(String item_detail) {
    this.item_detail = item_detail;

public String getItem_security_code() {
    return item_security_code;

public void setItem_security_code(String item_security_code) {
    this.item_security_code = item_security_code;

public String getLoaned_status() {
    return loaned_status;

public void setLoaned_status(String loaned_status) {
    this.loaned_status = loaned_status;

public String getExpire_date_status() {
    return expire_date_status;

public void setExpire_date_status(String expire_date_status) {
    this.expire_date_status = expire_date_status;

public String getQr_code_status() {
    return qr_code_status;

public void setQr_code_status(String qr_code_status) {
    this.qr_code_status = qr_code_status;

public PrivacyData getPrivacyData() {
    return privacyData;

public void setPrivacyData(PrivacyData privacyData) {
    this.privacyData = privacyData;


Kurnia did you actually find the answer on your question or you still need assistance?

Regards Anton

ya, handy ask for my ItemData class, n theres it. is there any mistake on that class.

You get this error because you have one to many relation, but your model describes it as one to one relation

private PrivacyData privacyData;

so you have to change model, or change the relation type.

What model to use when use 1 to many? Make it as array? PrivacyData [ ] privacyData; ?

private java.util.List<PrivacyData> privacyData;