Fix panic in dialect. If FK Id is not referenced