Use Generics and Inheritance with entity attributes