I want to make it so that anytime the db is queried for an sfGuardUserProfile it is autmoatically joined and hydrated with its related sfGuardUser.
If i was using Propel 1.2 i would normally override the doSelectStmt method of the sfGuardUserProfilePeer class to inspect the Criteria and modify it as necessary as well as modifying the hydrate method of the sfGuardUserProfile class. Im not sure how to go about doing this in Doctrine though.
You could use Event Listeners. Read more about them in the doctrine documentation: Event Listeners
In symfony 1.4 sfGuardUser can be modified. It’s by default in lib/model/doctrine/sfDoctrineGuardPLugin/sfGuardUser.class.php. You can add following preDqlSelect() method to modify the query. Note that it’s not tested.
To make it working you need to have DQL callbacks turned on. You can do it in your ProjectConfiguration class: