This repository was archived by the owner on Mar 1, 2020. It is now read-only.

Description
If in your CoreData model you have an entity that inherits from another one, the properties of the parent entity will be added on both the parent and the child extensions. This causes a failure during compilation, because properties in extensions can't be overridden.
The correct behavior should be to write the properties only for the parent entity extension.
Example with "superentity" with a "subentity" child:
extension Superentity {
static var test:Attribute<NSNumber> { return Attribute("test") }
class func queryset(context:NSManagedObjectContext) -> QuerySet<Superentity> {
return QuerySet(context, "Superentity")
}
}
extension Attribute where AttributeType: Superentity {
var test:Attribute<NSNumber> { return attribute(AttributeType.test) }
}
This inherits from Superentity:
extension Subentity {
static var test:Attribute<NSNumber> { return Attribute("test") } // This causes a failure
class func queryset(context:NSManagedObjectContext) -> QuerySet<Subentity> {
return QuerySet(context, "Subentity")
}
}
extension Attribute where AttributeType: Subentity {
var test:Attribute<NSNumber> { return attribute(AttributeType.test) } // This causes a failure
}