make sure scope_chain_items has consistent types
use Relation#merge to combine scope chain items
just push on to the scope chain items. Oops! (thanks @carlosantoniodasilva)
cache the scope chain on the stack and eliminate `i`
cache the klass member of the reflection
decouple the manager class from building join constraints
parent_table is only used internally