-
Notifications
You must be signed in to change notification settings - Fork 38
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
Cannot be used with PostgreSQL #87
Comments
I suggest to add a configuration key 'database', which accepts either 'mysql' or 'postgresql' (or gets it from the Doctrine configuration automatically), to then customize the request according to which engine is used. |
Also, could you not use Doctrine to query the database? It would be much simpler! |
Hello @EdouardCourty thank you for reporting this issue. This is indeed a problem, I will have a look at it this week. |
Quick update on this subject As you can see if you read the code, the In order to be sure that the hydrated collection is in the same order than the given result by typesense (eg : We use it in a native SQL request. it could be done using the So, I don't see how to get a sorted collection with PostGreSQL that respects the Typesense order. I think we should refactor the code in order to sort the entities in PHP. |
Hi, thanks for your reply :) For now I'm using the RawQuery method and I deserialize the documents myself. I would be more than happy to contribute to the project! |
Describe the bug
Hi, when using TypesenseBundle with a PostgreSQL database, it is impossible to use the
query
method fromCollectionFinderInterface
, that is supposed to return hydrated Doctrine Entities.The bundle uses the
ORDER BY FIELD
directive, which is specific to MySQL.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should return the hydrated objects instead of crashing (from the SQL server).
Screenshots
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: