fix bug with entity hashcodes

key may be null on creation, cant be used as part of the hashcode. use
super instead.