What to call an class that inherits from NSManagedObject?
May be a silly question, but what's a class called that inherits from NSManagedObject? Is that an "Entity" class? Or is that an "Model" class? Or an "Entity-Object" class? I mean... ok, when I instatiate that thing I get an "Object". The "Entity" itself is actually the "Class" that describes the attributes and relationships, right?
From Apple:
"Entities are to managed objects what Class is to id, or–to use a database analogy–what tables ar开发者_开发百科e to rows."
I usually seem to see NSManagedObject subclasses referred to as "custom managed object classes". As for Entities, I think those are thought of more as part of the model or data store rather than a class, sort of like database tables might be represented by an object relational mapping but you wouldn't call the class the table definition. Entities are simply represented by classes, but in plain C they might be represented by structs.
When you instantiate a managed object class you get an object called a managed object.
It's still an object. I guess you could call it a managed object.
精彩评论