Conider I have a Class called Entity
that has 3 children :
ClientEntity
, EmployeeEntity
and ProductEntity
I want to have a static attribute _nextId
(that gives the new id for a new record)
_nextId
has a different value in each entity, but its a common attribute to all Entity children.
So my question is how can I put _nextId
in Entity
class and have methods that change this value, while getting a different value for each child class.
Thank you.