Automattic / Automattic/simplenote-ios

Deleted Property Collision

Open
#20 1 comment 0 reactions 0 assignees View on GitHub
debt
Dominant language
Swift
Stars
2.2k
Forks
297
Avg merge
13h 25m
Merged PRs (30d)
6

Description

Xcode 6.3 is printing out a collision between the `Note` entity's `deleted` attribute, and `NSManagedObject`'s `deleted` property.

Simplenote overrides `NSManagedObject`'s `deleted` getter, which is used internally by CoreData to mark entities for deletion, next time _save_ is executed.

Let's investigate + implement a safe workaround.

![screen shot 2015-04-21 at 1 31 26 pm](https://cloud.githubusercontent.com/assets/1195260/7257271/c24ce83c-e82a-11e4-8edd-9226878e2d55.png)

The cleanest workaround to fix this issue, is to preserve the remote attribute name (deleted), and map it into a different local attribute.

Let's first implement the appropiate Simperium Mechanism first.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Simperium mechanism for the Note entity and inspect how its deleted attribute is mapped. Confirm how NSManagedObject uses deleted during save, then implement the mapping that preserves the remote name while using a different local attribute. Done means the collision is resolved without breaking Core Data deletion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.