remove table as select util
pass entity classes as parameter