title: SQLAlchemy difference between contains_eager and joinedload
body: <p>what is the difference in SQLAlchemy between <code>contains_eager</code> and <code>joinedload</code>. 
  I read the <a href="http://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html#routing-explicit-joins-statements-into-eagerly-loaded-collections" rel="noreferrer">manual</a> about contains_eager, and <a href="http://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html#joined-eager-loading" rel="noreferrer">manual</a> about joinedload too. They are both can be used for loading one-to-many related rows, or many-to-one.</p>
  
  <p>they are generating the same sql:</p>
  
  <pre><code>query = session.query(User).\
      outerjoin(adalias, User.addresses).\
      options(contains_eager(User.addresses, alias=adalias)).all()
  
  ...
  
  SELECT
      users.user_id AS users_user_id,
      users.user_name AS users_user_name,
      adalias.address_id AS adalias_address_id,
      adalias.user_id AS adalias_user_id,
      adalias.email_address AS adalias_email_address,
      (...other columns...)
  FROM users
  LEFT OUTER JOIN email_addresses AS email_addresses_1
  ON users.user_id = email_addresses_1.user_id
  
  
  &gt;&gt;&gt; jack = session.query(User).\
  ... options(joinedload(User.addresses)).\
  ... filter_by(name='jack').all()
  
  SELECT
      addresses_1.id AS addresses_1_id,
      addresses_1.email_address AS addresses_1_email_address,
      addresses_1.user_id AS addresses_1_user_id,
      users.id AS users_id, users.name AS users_name,
      users.fullname AS users_fullname,
      users.password AS users_password
  FROM users
  LEFT OUTER JOIN addresses AS addresses_1
      ON users.id = addresses_1.user_id
  WHERE users.name = ?
  ['jack']
  </code></pre>
  
  <p>Can anybody show more particular code examples?</p>