What's the difference between entity and class?

前端 未结 7 916
孤独总比滥情好
孤独总比滥情好 2020-12-23 11:01

Is entity an instance of class?

7条回答
  •  一生所求
    2020-12-23 11:55

    Short -- yes.

    Entity is more a concept from real world. Instance (alias is object) -- from programming world.

    In programming world we also has an "entity" concept, but here it's more a child of an instance. So any entity is a child of instance. Also entity has it's links to other things but programming -- for example, as people said -- entity can have table in DB. Instance can't have table in DB. As instance is always connected to class.

提交回复
热议问题