Moved where clause to entity clases.