DbFinder Admin Generator ======================== The DbFinder plugin comes with a new generator class and theme. Equivalent in feature to the Propel and Doctrine Admin generators, the *DbFinder Admin Generator* relies entirely on `DbFinder` methods at runtime. This means that modules created with this generator are ORM agnostic - they work with Propel as well as with Doctrine. `generator.yml` parameters -------------------------- In order to transform a Propel or Doctrine module generated by way of the admin generator task, edit the `class` parameter and change it to `DbFinderAdminGenerator`: generator: class: DbFinderAdminGenerator param: model_class: Article theme: default `with` and `finder_methods` --------------------------- Being ORM agnostic, the `DbFinderAdminGenerator` does not accept the `peer_method` parameter. Instead, it supports a `with` parameter, where you can stipulate the classes of all the related objects you want to hydrate to save queries: list: display: [=title, category] with: [Category] Of course, as the `with()` method accepts several classes, you can hydrate more than one class: list: display: [=title, category, author] with: [i18n, Category, Author] *Note*: The resulting query contains a left join, while `sfPropelAdminGenerator` issues queries with a simple `where` condition. That means that even if you choose to hydrate related `Category` objects, the list view will still display `Article` objects with no `Category`. That's a huge difference with the usual generator based on Propel 1.2, which hides records as soon as you declare a `peer_method`. The list view uses a finder to retrieve the list of records. By adding method names to the `finder_methods` parameter, you 'filter' the view by these filters. This allows you to changes the display order, restrict results or hydrate supplementary columns to save on queries. list: display: [=title, category, author] finder_methods: [withNbComments] TODO ---- * Pake task to generate a DbFinder Admin Module * Migrate many-to-many code to DbFinder