Query Builder

Considering I have a AR Model called state with respect HAS_MANY cities (table city) (self::HAS_MANY, ‘City’, ‘state_id’) in State AR Model having city_id. To get the state with cities in AR I use:




State::model()->with('cities')->findByPk(1)



You can get the same result (the state data and an array of cities) using the query builder? or as described in the session DAO?

Thanks.