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

How to use kotlin value classes with typed queries #314

Open
arkadiuszSzast opened this issue Jan 2, 2022 · 1 comment
Open

How to use kotlin value classes with typed queries #314

arkadiuszSzast opened this issue Jan 2, 2022 · 1 comment

Comments

@arkadiuszSzast
Copy link

Hey!

I'm looking for an easy way to use typed queries with kotlin value classes. E.g.

data class Account(@BsonId val id: Id<Account>, val email: EmailAddress)
@JvmInline
value class EmailAddress(val value: String)

and then it will be awesome to search by email like that:

collection.findOne(Account::email eq email)

Is it somehow possible now or maybe there are plans to support it?
Thanks!

@zigzago
Copy link
Member

zigzago commented Jan 9, 2022

jackson kotlin module as an issue about this FasterXML/jackson-module-kotlin#199

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