Hello, IN operator does not work for realm query: ...
# multiplatform
d
Hello, IN operator does not work for realm query:
Copy code
suspend fun getRestaurantsProcessedOrdersWithThrowAndroid(): CommonFlow<List<ProcessedOrder>> {
        realm.syncSession.downloadAllServerChanges()

        val userId = appService.currentUser

        if(appService.currentUser != null) {
            val restaurantsIds = realm.query<Restaurant>("userID = $0", userId!!.id).find().map { it.getID() }
            val queryValues = restaurantsIds.joinToString(separator = ",", prefix = "{", postfix = "}")
            return realm.query<ProcessedOrder>(
                "restaurantID IN $0", queryValues
            ).asFlow()
                 .map {
                     it.list
                 }.asCommonFlow()
        }
        else{
            throw Exception("user not logged in")
        }

    }
I have tried with listOf("id,"id","id")... Do you know why?
e
https://kotlinlang.org/community/slackccugl.html
Please refrain from crossposting the same message on multiple channels. It is considered spamming.
p
You can check their open/closed issues or discussions here. https://github.com/realm/realm-kotlin/issues https://github.com/realm/realm-kotlin/discussions If you or company pay for Atlas they offer consultancy.