We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
interface SchedulerJob { val id: Id<SchedulerJob> val action: String } @Serializable data class UnmuteSchedulerJob( @Contextual @SerialName("_id") override val id: Id<SchedulerJob> = newId(), override val action:String )
-> id is correctly persisted as ObjectId -> but is deserialized as StringId (insead of WrappedObjectId)
it means that job.id != col.findOne()?.id
job.id != col.findOne()?.id
Workarounds:
IdGenerator.defaultGenerator = ObjectIdToStringGenerator
job.id == col.findOne()?.id?.run{ WrappedObjectId(toString()) }
The text was updated successfully, but these errors were encountered:
I don't think it causes an exception though right?
Sorry, something went wrong.
I don't reproduce any exception with 4.2.2 KMongo version. If you get an exception with 4.2.2, please create a new ticket.
d548601
Successfully merging a pull request may close this issue.
-> id is correctly persisted as ObjectId
-> but is deserialized as StringId (insead of WrappedObjectId)
it means that
job.id != col.findOne()?.id
Workarounds:
IdGenerator.defaultGenerator = ObjectIdToStringGenerator
)job.id == col.findOne()?.id?.run{ WrappedObjectId(toString()) }
)The text was updated successfully, but these errors were encountered: