Open justinmakaila opened 9 years ago
I had the exact same problem, use "Transformable" and see: https://github.com/martijnwalraven/meteor-ios/issues/24
Can you explain a bit?
Do I set the isAvailable
property to a transformable in the .xcdatamodeld
? If so, how do I associate a value transformer with it?
I think you actually don't need to use my Transformer at all, it works if you just set it to Transformable and cast it:
read: let isPresent : Bool = object.isPresent as? Bool write: object.isPresent = isPresent (Bool)
For NSValueTransformers: here you go http://nshipster.com/nsvaluetransformer/
Well, the property is right on the client side, it’s not right on the web app due to the mapping, which leads to segmentation and weird issues.
—Justin Makaila
On Fri, Jun 19, 2015 at 9:07 AM, pozylon notifications@github.com wrote:
I think you actually don't need to use my Transformer at all, it works if you just set it to Transformable and cast it: read: let isPresent : Bool = object.isPresent as? Bool write:
object.isPresent = isPresent (Bool)
Reply to this email directly or view it on GitHub: https://github.com/martijnwalraven/meteor-ios/issues/38#issuecomment-113509768
I have a model:
When I create an instance of this model on the backend, it's done like so:
In my test web app, I retrieve updates with this query:
No updates will come back, because
isAvailable
is mapped to a1
or0
, and is not picked up to be truthy or falsey by the mongo query.Is there anyway to map this to a raw boolean value?