Function for custom setter / getter Core Data
<p>I'm trying to create a global function so my Core Data classes can use this function to create custom setters. But I'm getting `ambiguous use of 'willChangeValueForKey".</p>

<p>The code I'm using is:</p>

<pre><code>func coredataSetter&lt;T: NSManagedObject&gt;(entity: T, attribute: CustomStringConvertible, value: String) {
    entity.willChangeValueForKey(attribute.description)
    entity.setPrimitiveValue(value, forKey: attribute.description)
    entity.didChangeValueForKey(attribute.description)
}
</code></pre>

<p>I'm kinda confused...</p>