Implemented new hascode and equals functions that doesn't use the OpenJPA library