Data-swift/ManagedModels

Finish support for originalName/versionHash in `@Model` macro

helje5 opened this issue · 0 comments

Most of the infrastructure is in place, the sole thing missing should be the extraction of the parameters from the model macro.

E.g.:

@Model(originalName: "OldName", versionHash: "2828287")
class NewName: NSManagedObject {}

This already generate the original names into the class, but the values are not filled.

To do this, the parameter list of the model macro needs to be traverse, a matching name needs to be found and the associated expression used in the static variable of the class.

Shouldn't be very hard.