This comparsion is not correct IMO, you compare ID with entity object.