Template inter enitity compare