Reputation: 7606
I am using a Propel parameter converter in one of my controller: (Symfony 2.4.2 + Propel 1.7)
* @ParamConverter("center", converter="propel", class="MyCompany\Bundle\CoreBundle\Model\Center")
It's work well, but I'd like to add additional filters, typically a on a field isVisible
(but the filter may be more complex), it is possible? In fact, what I'd like is to use a custom query function of my model and not the basic findPk()
function.
Upvotes: 4
Views: 350
Reputation: 1193
You can add option "repository_method" If you want to specify the repository method to use to find the entity
* @ParamConverter("center", converter="propel", class="MyCompany\Bundle\CoreBundle\Model\Center", options={"repository_method" = "findByCustomQuery"})
Upvotes: 4