Development

#2730 (sfLuceneModelResult should provide way to retrieve model instance)

You must first sign up to be able to contribute.

Ticket #2730 (closed enhancement: fixed)

Opened 9 months ago

Last modified 5 months ago

sfLuceneModelResult should provide way to retrieve model instance

Reported by: Carl.Vondrick Assigned to: Carl.Vondrick
Priority: minor Milestone:
Component: sfLucenePlugin Version:
Keywords: Cc:
Qualification: Unreviewed

Description

When a model result is returned from the Lucene index, there should be a method to return the model instance that the result refers to. If the result refers to the "Blog" model with ID = 42, then a method ->getModelObject() would return BlogPeer::retrieveByPK(42).

This will require breaking up sfLuceneModelResult into sfLucenePropelResult and eventually sfLuceneDoctrineResult.

Change History

05/24/08 01:24:56 changed by Carl.Vondrick

  • status changed from new to closed.
  • resolution set to fixed.

(In [9225]) sfPropelSearch: added restoration retort to retrieve Propel model from a search result (closes #2730)

  • supports composite keys
  • works in Propel 1.2 and Propel 1.3
  • unit tests for retort
  • register the retort with a service:
        $service->addRetort(new xfPropelRetortRestore);
    
  • retrieve model:
        $result->getPropelModel();