ios - RLMException: Can't persist property 'id' with incompatible type, but nonexistant -
i'm trying new instance of object:
class myawesomerealmobject: baserealmobject { var field: string = "" var thing: string = "" var whatever: string = "" var something: string = "" var key: string = "" var cards = [otherrealmobject]()//wasnt either override static func primarykey() -> string? { return "key" } // override static func ignoredproperties() -> [anyobject] { // return ["id"] //this didnt work either // } }
this parent class
class baserealmobject: object { //nothing here, extending realm's object }
and runtime exception.
2015-08-19 10:03:53.388 app[84571:2188559] *** terminating app due uncaught exception 'rlmexception', reason: 'can't persist property 'id' incompatible type. add ignoredpropertynames: method ignore.' *** first throw call stack: ( 0 corefoundation 0x0000000110913c65 __exceptionpreprocess + 165 1 libobjc.a.dylib 0x00000001105acbb7 objc_exception_throw + 45 2 realm 0x000000010ff0d786 -[rlmproperty initswiftpropertywithname:indexed:property:instance:] + 879 3 realm 0x000000010ff064e6 +[rlmobjectschema propertiesforclass:isswift:] + 519 4 realm 0x000000010ff056b6 +[rlmobjectschema schemaforobjectclass:] + 419 5 realm 0x000000010ff3de12 +[rlmschema initialize] + 805 6 libobjc.a.dylib 0x00000001105ad4d6 _class_initialize + 648 7 libobjc.a.dylib 0x00000001105b66e1 lookupimporforward + 351 8 libobjc.a.dylib 0x00000001105c30d3 objc_msgsend + 211 9 realm 0x000000010ff02c44 -[rlmobjectbase init] + 112 10 realmswift 0x000000010ce29573 _tfc10realmswift6objectcfms0_ft_s0_ + 67 11 realmio 0x000000010c0c3741 _tfc7realmio11realmobjectcfms0_ft_s0_ + 17 12 realmio 0x000000010c0b4aa5 _tfc7realmio8userdatacfms0_ft_s0_ + 309 13 realmio 0x000000010c0b495c _tfc7realmio8userdatacfms0_ft_s0_ + 44 14 realmio 0x000000010c0be05d _tfc7realmio18userdataserializer13provideobjectfs0_ft_pss9anyobject_ + 29 15 realmio 0x000000010c0a49cf _tfc7realmio14dataserializer3mapfs0_ftcso12nsdictionary7successft6objectpss9anyobject__t_18datastructureerrorft_t__t_ + 175 16 realmio 0x000000010c0a508b _ttwc7realmio14dataserializers_15idataserializers_fs1_3mapus1___fqps1_ftcso12nsdictionary7successft6objectpss9anyobject__t_18datastructureerrorft_t__t_ + 91 17 realmio 0x000000010c138010 _tffc7realmio15basedataservice7executefs0_ftfpss9anyobject_t_23handlesfailedvalidationfgsass_t__t_u_fcso12nsdictionaryt_ + 560 18 realmio 0x000000010c26798b _tffc7realmio3api8dispatchfs0_ft_t_u_ftcso12nsurlrequestgsqcso17nshttpurlresponse_gsqpss9anyobject__gsqcso7nserror__t_ + 1355 19 realmio 0x000000010c0f156e _tffc7realmio7request12responsejsonfds0_ft7optionsvsc20nsjsonreadingoptions17completionhandlerftcso12nsurlrequestgsqcso17nshttpurlresponse_gsqpss9anyobject__gsqcso7nserror__t__ds0_u_fts2_gsqs3__gsqps4___gsqs5___t_ + 126 20 realmio 0x000000010c0e8493 _tfffc7realmio7request8responsefds0_ft5queuegsqcso8nsobject_10serializerftcso12nsurlrequestgsqcso17nshttpurlresponse_gsqcso6nsdata__tgsqpss9anyobject__gsqcso7nserror__17completionhandlerfts2_gsqs3__gsqps5___gsqs6___t__ds0_u_ft_t_u_ft_t_ + 403 21 realmio 0x000000010c0a7c77 _ttrxfo__dt__xfdcb__dt__ + 39 22 libdispatch.dylib 0x00000001112c3186 _dispatch_call_block_and_release + 12 23 libdispatch.dylib 0x00000001112e2614 _dispatch_client_callout + 8 24 libdispatch.dylib 0x00000001112caa1c _dispatch_main_queue_callback_4cf + 1664 25 corefoundation 0x000000011087b1f9 __cfrunloop_is_servicing_the_main_dispatch_queue__ + 9 26 corefoundation 0x000000011083cdcb __cfrunlooprun + 2043 27 corefoundation 0x000000011083c366 cfrunlooprunspecific + 470 28 graphicsservices 0x0000000112a71a3e gseventrunmodal + 161 29 uikit 0x000000010da098c0 uiapplicationmain + 1282 30 realmio 0x000000010c1da607 main + 135 31 libdyld.dylib 0x0000000111316145 start + 1 )
i don't event have field name 'id'. i've added ignoredproperties()
, not sure else do.
edit: happens without fields on entity
i tried adding dynamic
modifier, didn't work. troubleshooting more, blew away fields.
class myawesomerealmobject: rlmobject { }
and still runtime exception regarding 'id'.
edit 2: more information exception
i'm wondering if shed light on it
2015-08-19 12:27:51.658 realmio[5728:52676] exception name=rlmexception, reason=can't persist property 'id' incompatible type. add ignoredpropertynames: method ignore., userinfo={ rlmrealmcoreversion = unknown; rlmrealmversion = "0.94.1"; } addresses=(0x112f16c4d 0x112bafbb7 0x111e36786 0x111e2f4e6 0x111e2e6b6 0x111e66e12 0x112bb04d6 0x112bb96e1 0x112bc60d3 0x111e2bc44 0x111e2ab6d 0x10e6b6b21 0x10e6b6b5c 0x10e6bfe6d 0x10e6a76ef 0x10e6a7dab 0x10e73a340 0x10e86ba1b 0x10e6f3a1e 0x10e6ea943 0x10e6aa997 0x113fab186 0x113fca614 0x113fb2a1c 0x112e7e1f9 0x112e3fdcb 0x112e3f366 0x114390a3e 0x10ffad8c0 0x10e7ddcc7 0x113ffe145)
rlmrealmcoreversion = unknown. hmmm
it turned out realm parses of entities in model in lazy way. 'id' error because entity had id of type uint
, unsupported.
i changed field on different entity type int
, supported realm.
now getting errors other fields, @ least know now.
Comments
Post a Comment