title: SQLAlchemy/Elixir property to access row from seperate table without using multiple select queries
body: <p>We have a Person model</p>
  
  <pre><code>from project.model import User
  
  class Person(Entity, PersonHook):
      ...
      @property
      def user_name(self):
          u = User.get(self.user_id)
          return u.user_name if u else ""
  </code></pre>
  
  <p>When we are doing a big query for Person and accessing Person.user_name it will create a select statement for every single Person from the User table.</p>
  
  <p>Is it possible to load the two objects Person and User at the same time?</p>
  
  <p>Our project is using the old and outdated Elixir declarative layer for SQLAlchemy.</p>
  
  <p>In the DB they have a relationship of User.user_id and Person.person_id I have tried several forms of sqlalchemys relationship<br>
  <code>user = relationship('User', primaryjoin='foreign(Person.user_id) == User.user_id')</code><br>
  <code>user = relationship('User', foreign_keys=[user_id], primaryjoin = 'User.user_id == Person.user_id')</code><br>
  But all I get is <code>&lt;RelationshipProperty at 0x7f8fdd5ee5a0; no key&gt;</code></p>