Skip to content

Cannot be used with PostgreSQL #87

Description

@EdouardCourty

Describe the bug
Hi, when using TypesenseBundle with a PostgreSQL database, it is impossible to use the query method from CollectionFinderInterface, 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:

  1. Start a Symfony 6.3 project, with a PostgreSQL database, and TypesenseBundle enabled
  2. Configure the bundle properly to persist an entity (like a topic with an author and a content)
  3. Persist at least one entity
  4. Use the query method

Expected behavior
Should return the hydrated objects instead of crashing (from the SQL server).

Screenshots
image
image
image

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 LTS
  • Docker

Additional context

  • PostgreSQL version: postgres:14.2 (postgres:14.2-alpine docker image)
  • Typesense version: 0.25.0 (typesense/typesense:0.25.0 docker image)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions