Skip to content

Drivers

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback

1 result found

  1. Kotlin Driver - Allow querying nested properties via data classes

    In the Kotlin driver extensions, we can use data class KProperties to create Filters. For example given these models as data classes:

    data class Movie(val movieName: String, releaseDate: LocalDate, rating: String)

    data class MovieReview(val movie: Movie, val rating: Double, val review: String, val reviewerName: String)

    If I wanted to query a movie review by its rating I could simply write:

    MovieReview::rating gte .8

    but if I wanted to query a MovieReview by the movie name I cannot currently do:

    MovieReview::movie.movieName eq "Mobile Suit Gundam: Char's Counterattack"

    I believe KMongo has the ability to do this by overloading the / operator…

    1 vote
    declined  ·  2 comments  ·  Unspecified  ·  Admin →
  • Don't see your idea?

Drivers

Categories

Feedback and Knowledge Base