Make entities hashable