Fixes embedded hasMany primary key lookup.