https://kotlinlang.org logo
Title
u

user

07/09/2022, 9:51 PM
Cannot construct instance of `{dataclass}, problem: Should never call `set()` on setterless property "authors" is my collection in MongoDB. my schema authors = [ { name: "Author1", books: [ {title:"Book1"}, {title:"Book2"} ] } ] I'm trying to append the books array by adding another book object (book3). Before that, I have to check whether there exists an object already in the author's name. So I have the findOneByAuthorname function. My issue is that every time I try to call the findOneByAuthorname function. I get an error - Unhandled: POST - /v1/api/addBooks. Exception class...