Comments (5)
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.
Sounds like something is missing from the configuration. Can you share your setup, please?
from postgresql-for-doctrine.
Did you find what's the problem?
from postgresql-for-doctrine.
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.
from postgresql-for-doctrine.
Related Issues (20)
- heavy composer package with uneeded files HOT 2
- How to use TO_JSON with JSON_GET_FIELD_AS_TEXT HOT 1
- jsonb_build_object support? HOT 1
- Postgres 14-specific JSON syntax HOT 1
- array_agg doesn't support ORDER BY HOT 1
- float[] type
- Jsonb::convertToPHPValue(): Return value must be of type array|string|int|float|null, bool returned HOT 2
- symfony / doctrine configuration help HOT 1
- getResults() returns arrays instead of objects HOT 1
- ? and ?| operators HOT 4
- `ANY` should accept `text[]` field, currently throw a `Expected Doctrine\ORM\Query\Lexer::T_SELECT` HOT 2
- Dependency Dashboard
- Cant install 2.1.1 version HOT 1
- Error with symfony and dql ilke function HOT 1
- Error with UNACCENT HOT 2
- Jsonb type limited convert HOT 4
- Cannot use object of type Doctrine\Common\Lexer\Token as array HOT 1
- Add support for DBAL v4 HOT 3
- InArray use ANY instead of ANY_OF HOT 2
- Wanted to add your package in PHP 8.0.12 project, but PHP version requirement is not met HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgresql-for-doctrine.