Tuesday 15 February 2011

iphone - Core Data generic attribute type for abstract entity -


I have a specific parent unit datapoint with many attributes, and 3 child organizations BinaryPoint , FloatPoint , and ScalePoint . Each child should have a value character, but a different type (boole, float, and int respectively).

It seems that it is a bad design to do anything other than creating a heritage trait, but I can not find any way to do this.

Thanks in advance.

There is no way to do in core data model editor AFASIK. You must choose a special type, eg Binary data, and changes from the NSDT to the actual value or to specify yourself in the code.

No comments:

Post a Comment