Stack Exchange
Only one field is getting added in parse.com database
Only last field in getting saved in the parse.com database, can any one tell me why?
Database only saves the field with place name "G E" and ignores the first inputted data!
    ParseObject testObject = new ParseObject("locations");


    ParseGeoPoint point = new ParseGeoPoint(21.177051,79.061818);

    //1
    testObject.put("placeName", "Brand Factory");
    testObject.put("address","Brand Factory,RKNEC,Nagpur");
    testObject.put("locationPoint", point);
    testObject.put("offers", "10% on Clothing");

    testObject.saveInBackground();
    //2
    point = new ParseGeoPoint(21.177161,79.060533);

    testObject.put("placeName", "G E");
    testObject.put("address","G E, RKNEC, Nagpur");
    testObject.put("locationPoint", point);
    testObject.put("offers", "20% on Shoes");

    testObject.saveInBackground()


I think Parse simple overwrite your place fields. Use ParseObject testObject = new ParseObject("locations"); every time before put new values:
//1
ParseObject testObject1 = new ParseObject("locations");
ParseGeoPoint point1 = new ParseGeoPoint(21.177051,79.061818);
testObject1.put("placeName", "Brand Factory");
testObject1.put("address","Brand Factory,RKNEC,Nagpur");
testObject1.put("locationPoint", point1);
testObject1.put("offers", "10% on Clothing");
testObject1.saveInBackground();
//2
ParseObject testObject2 = new ParseObject("locations");
ParseGeoPoint point2 = new ParseGeoPoint(21.177051,79.061818);
testObject2.put("placeName", "G E");
testObject2.put("address","G E, RKNEC, Nagpur");
testObject2.put("locationPoint", point2);
testObject2.put("offers", "20% on Shoes");
testObject2.saveInBackground()

