SQLAlchemy's docs are great but a little overwhelming at times for someone coming from Rails and Active Record.
Given this Active Record relationship set what would be the SQLAlchemy equivalent to establish a relationship through an intermediary table?
Specifically given the basic Active Record example below I'm trying to understand how to define an equivalent relationship in SQLAlchemy that can allow an Account SQLAlchemy model to be tied to an AccountHistory Model. I'm not clear if I'm supposed to be using a mapper function and I feel like I'm missing something simple in SQLAlchemy.
class Supplier < ActiveRecord::Base
has_one :account
has_one :account_history, through: :account
end
class Account < ActiveRecord::Base
belongs_to :supplier
has_one :account_history
end
class AccountHistory < ActiveRecord::Base
belongs_to :account
end