0

i am new in using android programming and Parse.com.

I try to make a booking room apps with connect to Parse.com and i successful make the login.

i try to insert data to existing class in my Parse.com which name is "booking_details". In the login part, i use the Parse.com provided class(name as "User"). After that i create new class in for insert my booking time.

ParseQuery<ParseObject> query = ParseQuery.getQuery("booking_details");

when i try to use

parse.put();//will occur error, query can't be resolve to a type

what code i suppose to use? i see the Parse.com tutorial i still can't solve my problem. Appreciate to those who reading my question and helping.

1 Answer 1

2

You save the object, not the query. This is from the docs:

ParseObject bookingDetails = new ParseObject("booking_details");
bookingDetails.put("name", "Joe Blow");
bookingDetails.put("date", System.currentTimeInMillis());
bookingDetails.saveInBackground();
Sign up to request clarification or add additional context in comments.

5 Comments

ya this work, i thought "ParseObject gameScore = new ParseObject("GameScore");" this will make a new class.
may i ask you a question, i try insert twice to my parse.com but only can insert once time, if want to insert another data need to exit apps and reopen then insert again. Does the parse.com prevent us for duplicate entries?
You mean save a new object? To do that you just create a new object. Every time you want to save a new object just call new ParseObject() like above.
ya i mean save new object. i create save object in a method, so everytime i click submit button i will call that method, but when i try to insert twice was unsuccessful, need to exit apps and reopen.
ya i noticed where is my mistake, because i create the new ParseObject("booking_details") in outside the method, thank for you remind!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.