def _get_profile(self):
    if not hasattr(self, '_profile'):
        self._profile = Profile.objects.get(user=self)
        self._profile.user = self

    return self._profile
Operations that involve sharing M2M objects across databases raise an error
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/accounts/models.py/_get_profile--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/multiple_database/tests.py/QueryTestCase.test_m2m_cross_database_protection