-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search with doctrine orm #131
Comments
Hi, first of let me apologize for the horrible documentation. So you may want to wait till v2.0 as there is no BC layer and a complete upgrade is required. For now, looking at the gist there a number of problems in usage. When using RollerworksSearch with the Symfony Framework you need to install and enable the RollerworksSearchBundle and use the services (for the best experience). Use
You only need
|
Hello, Thanks for your fast answer. Unfortunately, I won't have time to wait and would like to get this bundle working. I've looked around for pure php search solutions, and really liked what I read in the docs (I hope I don't have horrible taste :-) Indeed, my gist was quite an ugly piece of code, I was planning to put it in shape after my test. I took your advice and cleaned it, but the problem is still there. I think I've missed something with the searchCondition logic or the way to glue it... It now looks like this : https://gist.github.com/kermorgant/9af1d3c900fb2c08594fb3eb09ae0ec9 The var_dump at line 26 shows this : 'SELECT l FROM AppBundle\Entity\Livre AS l' I you have an idea, I'd be glad to hear about it. |
There is no mapping between the fields and the Entity properties. This can be done with the Or setting the Note that for processing a search request there is a SearchProcessor in the bundle but the documentation is incomplete (https://github.com/rollerworks/RollerworksSearchBundle/pull/15/files).
I will see if I can fix-up some parts as I should be able to re-use those for v2.0 😃 |
Thanks again, that did the trick !
Sorry to ask again for help, but I tried pattern matching (with mariadb 10) and got this error :
Got it working for my setup by replacing line 142 in AbstractQueryPlatform.php by
But this is not a solution, just debugging Any idea to get that right ? |
Would this be an acceptable fix ?
|
I will investigate this further 👍 |
Well that's odd it's working with the DBAL driver but the ORM driver (which internally uses the same logic) fails to work 😐 it seems the backslash is double escaped. |
Hi. Thanks for the fix, works fine now ! |
Great to hear that 👍 I will still add some tests in ORM to prevent regressions. |
Hello,
I've tried to setup a simple search using search-doctrine-orm-bundle, but there's something I have missed to get the conditions applied to the statement (so I get all records instead of only the one I ask for).
I've put everything into one action to start experimenting, and it looks like this :
https://gist.github.com/kermorgant/2a1396681ed74082614c50cff71ace5c
Could you please have a look and see what's missing ?
Regards,
Mikael
The text was updated successfully, but these errors were encountered: