Skip to content

Nitrite/Java: Error while updating with an embedded object #15

Answered by anidotnet
hiroladev asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry again for belated reply, got a little tied up with my day job, so could not pay attention to your issue. The problem here is with the write method in User class. You also have to write nitriteId field in the document like other fields. As you are handling the serialization and deserialization manually, you have to take care of each and every field of your object.

@Indices({
        @Index(value = "uuid", type = IndexType.Unique),
        @Index(value = "emailAddress", type = IndexType.Unique)
})
public class User extends PersistentObject {

    @Id
    private NitriteId nitriteId;
    private String uuid = UUIDFactory.generateUUID();
    private String emailAddress = UUIDFactory.gen…

Replies: 0 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@anidotnet
Comment options

@hiroladev
Comment options

Answer selected by anidotnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested nitrite-java Nitrite for Java
2 participants