What will be T? Your domain class? If this is the case, why not make the Entity class non-generic and directly inherit from Entity?
In general, I found that it is good practice to get all the domain classes that can be processed by a specific repository from a common interface or base class. This allows the repository to be common to this interface, providing compile-time checks when you try to use the repository to preserve what the repository maps. However, if you use a base class, do not match it unless you need a way to uniquely identify any Entity, regardless of its actual type of subclass; otherwise, you will receive this Entity table (with any common fields) as a table in your database, and it may be difficult for you to manually track your data level.
However, a generic, displayed Entity may be desirable; You can uniquely identify Persons and Companies by a common column of identifiers, which is unique even through Persons and Companies, which are stored in different tables.
Here is a sterilized example of a hierarchy that I used in one of my projects:
source share