Close #2350 Fixes generated model relationship tests