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

Update unsigned integers #356

Closed
CLOVIS-AI opened this issue Jul 24, 2022 · 1 comment
Closed

Update unsigned integers #356

CLOVIS-AI opened this issue Jul 24, 2022 · 1 comment

Comments

@CLOVIS-AI
Copy link

@Serializable
class Foo(
    @SerialName("_id") val id: Id<Foo>,
    val counter: ULong,
) 

Trying to increase the counter:

foo.updateOne(Foo::id eq id, inc(Foo::counter, 1))

fails with:

Type mismatch.
  Required: Number?
  Found: ULong

It seems like ULong & co do not inherit from Number, so it is not possible to increment them easily using the API.

@zigzago
Copy link
Member

zigzago commented Aug 7, 2022

Thank you for reporting. I fix it.

@zigzago zigzago closed this as completed in 6b8f246 Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants