This is my appid : BC9120DC-3E6F-DE66-FF91-199819BBAD00
This is my Item class :
public class Item {
private String name,description,picPath,reward, lostDate,objectId,contact;
private GeoPoint location;
private boolean lost;
private List<Tag> tags;
public Item() {
}
public Item(String date, String description, GeoPoint location, boolean lost, String name, String picPath, String reward,String contact) {
this.lostDate = date;
this.description = description;
this.location = location;
this.lost = lost;
this.name = name;
this.picPath = picPath;
this.reward = reward;
this.contact = contact;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getLostDate() {
return lostDate;
}
public void setLostDate(String lostDate) {
this.lostDate = lostDate;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public GeoPoint getLocation() {
return location;
}
public void setLocation(GeoPoint location) {
this.location = location;
}
public boolean isLost() {
return lost;
}
public void setLost(boolean lost) {
this.lost = lost;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPicPath() {
return picPath;
}
public void setPicPath(String picPath) {
this.picPath = picPath;
}
public String getReward() {
return reward;
}
public void setReward(String reward) {
this.reward = reward;
}
public String getObjectId() {
return objectId;
}
public void setObjectId(String objectId) {
this.objectId = objectId;
}
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
public void addTag( Tag tag )
{
if( tags == null )
tags = new ArrayList<Tag>();
tags.add( tag );
}
}
and this is my Tag class :
public class Tag {
private String tagText,objectId;
public Tag() {
}
public Tag(String tagText){
this.tagText = tagText;
}
public String getTagText() {
return tagText;
}
public void setTagText(String tagText) {
this.tagText = tagText;
}
public String getObjectId() {
return objectId;
}
public void setObjectId(String objectId) {
this.objectId = objectId;
}
}
and here is my schema build in the backendless :
http://support.backendless.com/public/attachments/64320919cc463a47917271fcbcd3b1cd.png</img>
and here is how I am saving :
HashMap item2send = new HashMap();
item2send.put( "___class", "Item" );
item2send.put( "name", item.getName() );
item2send.put( "description", item.getDescription() );
item2send.put( "reward", item.getReward() );
item2send.put( "contact", item.getContact() );
item2send.put( "picPatch", f.getFileURL() );
item2send.put( "lostDate", item.getLostDate() );
item2send.put( "lost", true );
item2send.put( "location", item.getLocation() );
item2send.put( "tags",listtags );
Object b=Backendless.Persistence.of(Item.class).save(item2send);
http://support.backendless.com/public/attachments/fa609c4dd44f0a430010a373a6fb6140.png</img>