Add implementation of SelectEntity query