propel - JoinWith并使用Query

What is a diference beetween JoinWith, and useTablenameQuery ? How its work in propel, why JoinWith is faster than useTable_nameQuery ? How work formatter ? Thanks for help :

)

Main difference is when you have filter specifically for the on the right like TableB=?

joinWith: Default Join condition as defined in the schema

$rows = TableAQuery::create()
    ->joinWith('TableB')
    ->find();

useTableBQuery Use a filter for the table right

$rows = TableAQuery::create()
    ->useTableBQuery()
        ->filterByColumnName($value) // A column in TableB
    ->endUse()
    ->filterByColumnName($value2) // A column in TableA
    ->find();

Notice the second ->filterByColumnA() is outside the ->useTablBQuery, to illustrate that you can have filter on both tables