HAS_ONE relation keys fix