Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and AddUnique not implemented? #53

Open
seuribe opened this issue Nov 17, 2015 · 0 comments
Open

Add and AddUnique not implemented? #53

seuribe opened this issue Nov 17, 2015 · 0 comments

Comments

@seuribe
Copy link

seuribe commented Nov 17, 2015

I need to add a ParseObject array to an object. With the Android API I use the ParseObject.addAll method:

    public ParseObject getParseObject() {
        ParseObject po = new ParseObject("CustomExercise");
        po.put("type", type.id);
        po.put("question", question);
        po.put("user", ParseUser.getCurrentUser());

        int index = 0;
        List<ParseObject> opts = new ArrayList<ParseObject>();
        for (String option : options) {
            ParseObject opo = new ParseObject("ExerciseOption");
            opo.put("text", option);
            opo.put("correct", index == correctIndex);
            opts.add(opo);
            index++;
        }
        po.addAll("options", opts);
        return po;
    }

which works well, but I get an "java.lang.IllegalArgumentException: not implemented!" exception when trying to use add or addAll in Parse4j. The documentations mentions addAllUnique, but it's also not implemented. Is there an alternative way of doing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant