BrianDoig/MagicalRecord — comment on commit 32cf9d23363e137917b1ce89c5f85af336bc09e5
File:  line 0
By BrianDoig:

Well, I didn't want the case where it should have been the first but was the second to crash. Especially since they are semantically equivalent.

It's a to many property with a single object not in an array that was crashing. Perhaps not the perfect format, but also not a good idea to just crash. Especially if someone pushes an update to a file over the internet. That would break in the field.

On Feb 23, 2012, at 3:15 PM, Magical Panda Software wrote:

> You know, you can set this value in the userInfo dictionary:
>
> mappedKeyName: chestDropRate.name
>
> for a single value....but still, the to-one and to-many code is already there....not sure why it's missing that even though you changed the import to update...
>
> On Feb 24, 2012, at 12:13 AM, Brian Doig wrote:
>
>> "chestDropRate" : [
>> {
>> "name" : "foo",
>> "sequence" : 0,
>> "value" : 0
>> }
>> ]
>>
>> works but
>>
>> "chestDropRate" : {
>> "name" : "foo",
>> "sequence" : 0,
>> "value" : 0
>> }
>>
>> throws an exception because it tries to iterate over the keys of a NSDictionary which returns NSStrings which then throw a selector not recognized.
>>
>> On Feb 23, 2012, at 3:09 PM, Magical Panda Software wrote:
>>
>>> Can you give me an example of how this crashes? I'd ideally like to make a test case for this, but I'm also curious since this hasn't crashed here for me in a while...
>>>
>>> ---
>>> Reply to this email directly or view it on GitHub:
>>> https://github.com/BrianDoig/MagicalRecord/commit/32cf9d23363e137917b1ce89c5f85af336bc09e5#commitcomment-1004870
>>
>> ---
>> Reply to this email directly or view it on GitHub:
>> https://github.com/BrianDoig/MagicalRecord/commit/32cf9d23363e137917b1ce89c5f85af336bc09e5#commitcomment-1004883
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/BrianDoig/MagicalRecord/commit/32cf9d23363e137917b1ce89c5f85af336bc09e5#commitcomment-1004886