Support initializing RLMObjects using kvc objects without getters

Closes #1236

@tgoyne @jpsim 
The only thing I can think of is that throwing an exception there makes it clear when using KVC that that key is actually defined on the object. Other wise you just got a nil thrown in and wonder why things aren't working instead of a clear exception that you're trying to use KVC a/KVO on a keypath that is undefined. 

-Samuel E. Giddins

On Dec 17, 2014, at 5:51 PM, Ari Lazier <notifications@github.com> wrote:

In Realm/RLMObject.mm:

> @@ -343,4 +343,8 @@ - (NSUInteger)hash {
>      }
>  }
>  
> +- (id)valueForUndefinedKey:(__unused NSString *)key {
So we return nil rather than throwing an exception when trying to initialize an object with an object of another type which is missing a key, but where a default value is specified for the object being initialized. We don't necessarily have to do this, but it is an example of what users will have to do in this situation. All this came about from a user trying to create an RLMObject from a Parse object. Can you think of a situation where this is undesirable?

—
Reply to this email directly or view it on GitHub.