Skip to content

cannot set _id with async insertDocument #363

@konsultaner

Description

@konsultaner

I have a model:

public class MyModel implements Serializable {
    @DocumentField(DocumentField.Type.ID)
    protected String id;
    @DocumentField(DocumentField.Type.KEY)
    protected String key;
}

When setting the id to MyModel/1 and using synced version of

collection.insertDocument(myModel, documentCreateOptions);

The model will be stored with a key of 1. If I use the async verion of it I get a random key like 23748972. Is this a bug or a wanted behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions