Reputation: 4533
I am trying to convert Swift [Object]()
array to Realm's Results<Object>!
. I know that vice-versa is possible (you can see here) but is it possible to do what I want?
So I want something like result as! [Object]
.
Upvotes: 0
Views: 192
Reputation: 6065
Result
objects are proxies for data stored in the db. You can only get them via queries, but cannot instantiate them yourself (see the docs).
To still get Result
objects, you'd have to run a new query for the objects you already have, and use the returned Result
... I would not suggest that though.
Upvotes: 1