Test foreignkey related attribute