Realm nested object can't have the same property name as perant
<p>I have a model named <strong>JVTRoom</strong>
it represents a conversation room, and Its primary key is <strong>roomId</strong></p>

<pre><code>@interface JVTRoom : RLMObject
@property NSString* roomId; // PK
@property JVTInteraction *recentInteraction;
</code></pre>

<p>There is a model named <strong>JVTInteraction</strong> too, it represents a interaction inside a room.
Every interaction has a property named <strong>roomId</strong> too, so you can reference the room to the interaction.</p>

<p>Server recently added to the room model, a <strong>recentInteraction</strong>:</p>

<pre><code>@interface JVTRoom : RLMObject
@property NSString* roomId;
@property JVTInteraction *recentInteraction;
</code></pre>

<p>Now once I've added this property, the room values are not saved anymore when I call <strong>addOrUpdateObjectsFromArray</strong> with Realm.</p>

<p><strong>Only the interaction is updated.</strong>
When I remove the interaction property from the room, all the values are saved as expexted.</p>

<p>This is how I make the transaction:</p>

<pre><code>        [[RLMRealm defaultRealm] beginWriteTransaction];
        RLMRealm *realm = [RLMRealm defaultRealm];
        [realm addOrUpdateObjectsFromArray:rooms];
        [[RLMRealm defaultRealm] commitWriteTransaction];
</code></pre>

<p>As I see it, this is a problem since they both have a string property named roomId, and It causes some problem with indexing. </p>

<p>So my solution for now is adding this to JVTRoom:</p>

<pre><code>+ (NSArray *)ignoredProperties
{
    return @[@"recentInteraction"];
}
</code></pre>

<p>And by ignoring <strong>recentInteraction</strong>, It works.</p>

<p>Have anyone faced this issue and managed to solve it without renaming to property?</p>