Questions tagged [doctrine-orm]
Doctrine ORM is a PHP ORM. While Doctrine 1.2 uses the Active Record pattern, Doctrine ORM 2 and up uses the Data Mapper pattern. The Doctrine project is a collection of open source libraries and tools for dealing with database abstraction and Object-Relational Mapping written in PHP.
doctrine-orm
17,240
questions
0
votes
0
answers
9
views
Error with Doctrine ORM attribute after converting code from annotation
I am upgrading from PHP7 to PHP8, ran my doctrine entities through Rector to update the annotations to attributes. I'm getting the following error that I cannot get past:
Attribute "Doctrine\ORM\...
-1
votes
1
answer
23
views
How to hook Doctrine validation into EasyAdmin
I understand how to add validation for Doctrine 3 entities, but from what I can tell, EasyAdmin is supposed to display that validation as part of its forms. Currently it just throws exceptions which ...
1
vote
0
answers
30
views
I installed the simple_kafka_client for my symfony project and getting conflict errors
This is the relevant GitHub repo.
I am trying to use this code:
use PyaeSoneAung\AwsMskIamSaslSigner\AwsMskIamSaslSigner;
use SimpleKafkaClient\Configuration;
use SimpleKafkaClient\Producer;
$...
1
vote
0
answers
23
views
Doctrine: Object of class X could not be converted to string
I am currently building a package for ConcreteCMS to give users an access to an invoice list.
I use this Doctrine entity to store invoices:
/**
* @Entity
* @Table(name="...
-1
votes
0
answers
20
views
Database table prefix in api-platform
We are using a Doctrine NamingStrategy to prefix all our Database tables. So for example Entity Customer is related to table abc_customer. Obviously Api Platform doesn't know about this NamingStrategy ...
1
vote
1
answer
18
views
Post request in graphql is returning data fields but their values are null
I made a graphql controller that resolves information about category's from doctrine-orm. The problem starts when I input following command to my terminal:
curl -X POST http://localhost:8000/graphql ...
1
vote
0
answers
38
views
How to get Doctrine to accept JSON field be stored in a LONGTEXT column again?
TLDR: In Doctrine, Local development setup suddenly decided that LONGTEXT column is no valid container for JSON entity field. However, this JSON field is happily stored in a LONGTEXT column on the ...
0
votes
0
answers
84
views
Could not convert PHP value of type DateTimeImmutable to type Doctrine\DBAL\Types\DateTimeType
I have a Symfony Command that reads rows from a spreadsheet and inserts them into a MySQL table. The command was working fine in Symfony 4.4. I started getting this error after I upgraded my version ...
0
votes
0
answers
67
views
Symfony ParamConverter to MapEntity
I am trying to upgrade my symfony application from version 5.4 to 6.4, as Sensio Bundle is abandoned i need to use attribute instead of annotation , how can i convert paramcoverter annotation to ...
-1
votes
0
answers
24
views
Symfony7 + doctrine3 + postgres = The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue
On a brand new Postgres database
postgres:
container_name: postgres
image: "postgres:latest"
ports:
- 5432:5432
environment:
POSTGRES_USER: app
...
-1
votes
1
answer
29
views
Foreign keys/Join columns and Join tables are not created by Doctrine in Symfony 5+
In the title I mentioned both Foreign keys and Join tables. In this case, to begin with, I am concerned with Foreign keys. But anyway a Join table is just multiple Foreign keys in a table. It seems ...
-1
votes
1
answer
35
views
Get rid of a circular reference on complex entities relations (Symfony 6.4)
I have a circular reference error in my app, when i want of normalize an object width ObjectNormalizer and Serializer, that I can't get rid of.
I've done that several times but this app is more ...
0
votes
0
answers
33
views
Cartesian cross joins in Doctrine
Using Doctrine, is it possible to do Cartesian cross joins?
Example:
SELECT * FROM t1, t2 WHERE ...
Where t1 and t2 represent entities, and is it possible to attach the retrieved entities to the unit ...
0
votes
0
answers
46
views
doctrine 2 to Doctrine 3 = HINT_FORCE_PARTIAL_LOAD not available
I had this in doctrine 2 for my query builder
$query = $query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, 1);
Since updating to doctrine 3 it does not work anymore. VSCODE does not find the parameter ...
1
vote
1
answer
119
views
Symfony + doctrine: Can only configure "xml", "yml", "php", "staticphp" or "attribute" through the DoctrineBundle
upgrading symfony from 6 to 7 getting this doctrine error
In AbstractDoctrineExtension.php line 229:
...