Open
Description
Sharing a whole entity hasn't been the best idea. But pre-creating the metadata info slots should always be possible. Of course inverse relationships won't usually be set as that requires the model resolution context.
E.g. this:
@Model class Person: NSManagedObject {
var firstname : String
var lastname : String
}
would generate sth like:
static let metadata = [
( "firstname", \Person.firstname, nil, nil ),
( "lastname", \Person.lastname, nil, nil )
]
(this is actually not true, this specific static type is detected by MM :-), but to illustrate the point).
Instead we should do:
static let metadata = [
( "firstname", \Person.firstname, nil, makePropertyDescription(for: \Person.firstname) ),
( "lastname", \Person.lastname, nil, makePropertyDescription(for: \Person.firstname) )
]
The prototypes in the metadata are always copied already, before they are added to an entity.
Metadata
Metadata
Assignees
Labels
No labels