How to Type cast in order by Couchbaselite SDK iOS?

Hi Support team,

In my document having a field named “listID” saved as string . While querying using iOS SDK I have to use orderBy “listID” property. Since number is saved as string So orderBy(Ordering.property(“listID”).ascending()) is treating it as string. Is there any way to typecast any property to Int in query?

In the CBServer I am getting the result using “order by To_Number(listID) DESC”. How to achieve this from CBLite iOS SDK?

Thanks
Venkatrao.

Not at the moment, but it is planned for a future release. The unfortunate workaround that people usually take here is to save an addition field with an actual integer value.