foreignkey and odm tests