title: Create a reverse relationship to two models
body: <p>I have a model <code>User</code>. For performance and other reasons I have to split this Model and its table into two, <code>UserA</code> and <code>UserB</code>. I decided to use materialized views (with the help of <a href="https://github.com/mikicz/django-pgviews" rel="nofollow noreferrer">django-pgviews</a>). Now what IS easy is to query the data of <code>UserA</code> which is already in the table, like the username or password. What doesn't work are reverse relationships. Let's say I have a <code>Checkout</code> model and in this:</p>
  <pre class="lang-py prettyprint-override"><code>user = models.ForeignKey(User, on_delete=models.SET_NULL, related_name='checkouts')
  </code></pre>
  <p>When I try to access <code>user.checkouts</code>, it of course throws an error: <code>Cannot resolve keyword 'checkouts' into field</code>.</p>
  <p>So how can I create a reverse relationship which is accessible from multiple models? I thought about using <a href="https://docs.djangoproject.com/en/3.2/ref/contrib/contenttypes/" rel="nofollow noreferrer">contenttypes</a> but this seems a bit much for this use case, especially because UserA and UserB are just views and have the same columns.</p>