Get the table name from class name and set the primary key