2009-02-26

Propel Behaviors: registering hooks for doSelectRS

If you read the chapter of symfony cookbook which talks about Propel behaviors, and tried to register a hook for doSelectRS, you'd find out it doesn't work.

In fact, doSelectRS was removed as of symfony 1.2. doSelectStmt took its place, so if you want to add a hook to selecting records, you should write something like this:
sfPropelBehavior::registerHooks('positioned', array(
 'Peer:doSelectStmt:doSelectStmt' => array('wgPropelPositionedBehavior', 'addAscendingOrderByPosition'),
));

Комментариев нет: