OPENJPA-2506: StoreCache interface doesn't work for many ID types - back ported Dalia's fix to 2.1.x.