vicpinm / Kotlin-Realm-Extensions

Kotlin extensions to simplify Realm API.
Apache License 2.0
535 stars 53 forks source link

Type interface failure #45

Closed nikitagudkovs closed 6 years ago

nikitagudkovs commented 6 years ago

Hi @ravidsrk

I'm trying to work with queries and this is what I get at every attempt:

screen shot 2018-02-06 at 19 24 50

Here's my class declaration.

Thank you in advance!

vicpinm commented 6 years ago

Hi @ravidsrk, sorry about that. In last version, queries doesn't receive anything in the lambda expression. So you should do: OrderData().delete { equalTo("id",1 }. The readme is not updated, I'm going to fix it. By the way, if you see an error in equalTo method like "overload resolution ambiguity", it happens in last realm versions, I'm not sure why. I have created a method equalToValue() for int and long types to avoid that error. You can use it if you see this error.

nikitagudkovs commented 6 years ago

Hi @vicpinm Thank you, OrderData().delete { equalTo("id",1 } is working.

Cheers!!