Closed tifroz closed 7 years ago
Errr...nevermind!! This pull request does prevent some errors with models that make use of super-entities / sub-entities, but at the end of the day it achieves nothing because models that use entity inheritance don't sync'd correctly: the sub-entities' attributes are ignored during the sync (only the super-entity's attributes are sync'd).
I will look into it, I may submit a more complete pull request later depending on what I find out.
Long day. After further digging it turns out that my sub-entity attributes are not being sync'd because they are of type Transformable
(it has nothing to do with sub-entity Vs super-entity) - so the pull request does make sense, it makes Seam3 compatible with models that use inheritance.
Next I'll be looking at adding at least partial support for Transformable
attributes - unless there is a reason this shouldn't be done (let me know)?
I committed the change to my cloned repository - it looks like I don't need to create another pull request...let me know otherwise!
Ugh...I committed additional changes to support Transformable Core Data attributes, thinking I would generate a separate pull request for this particular topic - but I think everything made it into the current pull request.
So, here is the new summary for this pull request:
• Adds support for Core Data models that make use of inheritance (super-entities / sub-entities)
• Adds partial support for Transformable
Core Data attributes (support is restricted to attributes that use the default transformer, e.g. NScoder
)
Yes, once you have a pull request open, any additional commits are added to that request.
You can create a new branch for your Transformable
code and then revert those commits from master if you want to keep it separate, then once you are ready you can merge your new branch back into master and submit another PR.
Or we can just include what you have so far if it is ready; it at least offers some support for Transformable
Yes, all the changes I pushed are unit-tested and ready to go - thank you for merging!
Checking for existence of a superentity before adding extra attributes (adding the attributes to both the superentity and its subentities causes errors because the model sees object that has 2 attributes with conflicting -i.e. identical- names)