Questions tagged [doctrine-dbal]
27 questions
0
votes
1 answer
I'm using doctrine orm and I want to compare the date(only) from a datetime column in the database to user inputted date (only)datetime-local in php
I have an entity with a due-date column saving datetime. I want to confirm that the date(alone) has not been saved before. But I'm unable to compare just the dates from the datetime objects. The datetime from the database repo and the datetime-local…

Zuby
- 5
- 5
0
votes
0 answers
Doctrine internal error when running generate-proxies
I have recently updated my Laminas PHP solution to PHP8.1. Everything is working fine except that I'm unable to dynamically generate the proxy files during deployment using the latest version of Doctrine.
When I attempt to run php…

dflinn2002
- 1
- 2
0
votes
0 answers
Reuse dbal connection for db configuration in doctrine migrations
In a Symfony project, I have these two dependencies installed:
"doctrine/dbal": "^3.3",
"doctrine/migrations": "^3.5",
I have several db connections defined in Symfony, one of them is:
db.connection:
class: Doctrine\DBAL\Connection
…

Nicolás González
- 121
- 12
0
votes
0 answers
Variable declaration in Doctrine
Is it possible to do something like this in Doctrine?
SET @somevariable=null;
I am currently doing the following:
$query = <<

Bird87 ZA
- 2,313
- 8
- 36
- 69
0
votes
2 answers
TYPO3: Using IS NULL and COALESCE in OrderBy with TYPO3 Querybuilder
I want to using the query
SELECT `uid` FROM `machines` ORDER BY NOT ISNULL(`changed`),`changed` DESC
in my controller .
For this I use the querybuilder like this:
$queryBuilder =…

Maximilian Z.
- 105
- 9
0
votes
1 answer
Doctrine DBAL, diff command and enum type
I am working with symfony 5.1, doctrine-bundle 2.1.2 and doctrine-migrations-bundle 2.2. I am NOT working with ORM and define my own Schemas. To add Enum types, I am using the following code:
abstract class EnumType extends Type
{
protected…

Sami Akkawi
- 193
- 3
- 9
0
votes
1 answer
How to change nullable columns to having default values in Laravel?
I want to change some table columns in Laravel from nullable to having a default value. I installed doctrine/dbal, and created a new migration with the following columns I want to change (previously nullable):
public function up()
{
…

Aejg
- 71
- 2
- 8
0
votes
1 answer
Doctorine/Dbal - Update table migration adding unwanted "Auto Increment" on integer (not increments)
I'm using Laravel 6.6.0 and Doctrine/Dbal 2.10.
I need to update a migration, and have followed the info in the docs.
I have a small unsigned non-auto-incrementing integer which I need to change to an integer.
I actually want it to be mediumint, but…

n8udd
- 657
- 1
- 9
- 30
0
votes
1 answer
TYPO3 throws exception when using unqoted named param
I'm trying to execute a raw query with a prepared statement in PDO-like style using unquoted params (cases 1, 1A), anyway it throws an exception:
An exception occurred while executing 'SELECT * FROM pages WHERE title LIKE :title': You have an error…

biesior
- 55,576
- 10
- 125
- 182
0
votes
1 answer
How to Fix Unknown Database Error When Migrate Database Using Doctrine/DBAL?
I tried to make a POS system in migration relationship. I used Doctrine/DBAL before running migrate for making the relationship. After installing Doctrine/DBAL when I run migrate an unknown database error appears. How to fix this error?
This is…

SisiliaPutri
- 55
- 6
0
votes
1 answer
Symfony - addHaving - concat + regexp
Raw query:
select firstfield, secondfield, phone_number, thirdfield
from table
having CONCAT(firstfield, ' ', secondfield, ' ', thirdfield, ' ', fourthfield) regexp 'value'
and CONCAT(firstfield, ' ', secondfield, ' ', thirdfield, ' ',…

Marin Sagovac
- 3,932
- 5
- 23
- 53
-2
votes
1 answer
Configure Symfony 3rd party bundle with container parameters declared in custom container extension / compiler pass
I want to configure the Doctrine bundle to have a DBAL connection. For some reason the configuration needs a bit of logic to retrieve. I tried to use a container extension and then a compiler pass to execute the logic while the container is compiled…

AymDev
- 6,626
- 4
- 29
- 52