Giter Site home page Giter Site logo

Comments (5)

vbourdeix avatar vbourdeix commented on August 9, 2024 1

Here is my config/packages/doctrine.yaml :

doctrine:
    dbal:
        # configure these for your database server
        driver: 'pdo_pgsql'
        charset: utf8
        default_table_options:
            charset: utf8
            collate: en_US.UTF-8

        url: '%env(resolve:DATABASE_URL)%'
        types:
            jsonb: MartinGeorgiev\Doctrine\DBAL\Types\Jsonb
    orm:
        auto_generate_proxy_classes: true
        naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_mapping: true
        mappings:
            App:
                is_bundle: false
                type: annotation
                dir: '%kernel.project_dir%/src/Entity'
                prefix: 'App\Entity'
                alias: App

        dql:
            string_functions:
                ILIKE: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Ilike
                CONTAINS: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Contains
                JSON_GET_FIELD: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonGetField

And here is a typical field definition inside my entity :

/**
     * @ORM\Column(type="jsonb", nullable=true)
     */
    private $test = [];

Did I miss something ?

from postgresql-for-doctrine.

martin-georgiev avatar martin-georgiev commented on August 9, 2024

Sounds like something is missing from the configuration. Can you share your setup, please?

from postgresql-for-doctrine.

martin-georgiev avatar martin-georgiev commented on August 9, 2024

Did you find what's the problem?

from postgresql-for-doctrine.

Aweptimum avatar Aweptimum commented on August 9, 2024

I tried reproducing this behavior while installing the package. Noticed that the mapping_types section is missing from @vbourdeix's doctrine config, so I omitted it and the migration does indeed default to json. Adding the following to doctrine.yaml fixes it

doctrine:
    dbal:
        mapping_types:
            jsonb: jsonb 

from postgresql-for-doctrine.

vbourdeix avatar vbourdeix commented on August 9, 2024

from postgresql-for-doctrine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.