fix key generation for non embedded has one associations