get object by id by providing column names and values