realm/realm-cocoa — pull request #1072 by tgoyne (2014-10-24 18:52:27+00:00)
Title: Reuse existing persisted objects passed to createInRealm:withObject:

Link to the existing objects in the Realm if they're of the correct type and in the Realm, and copy them otherwise.

I'm not totally convinced this is the right behavior, but I spent a depressingly long time trying to figure out why some tests I wrote weren't working before I realized that I was expecting this behavior rather than it linking to copies of the objects passed in the literal.

Either way there needs to be tests, as changing this didn't break any of the existing tests...

@alazier @jpsim