New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostrgreSQL 15 with Symfony 6.4 ID generation deprecation - SEQUENCE for Doctrine\DBAL\Platforms\PostgreSqlPlatform #1740
Comments
Found solution -> in your Entity's id field need to specify strategy 'SEQUENCE'
|
@Mepcuk Are your sure? I'm experiencing the same issue and based on the code in the This is also what I experience when trying different values. And as far as I can see this library doesn't support the As a side remark, one thing I found is that this deprecation only happens when an association mapping is part of the entity. |
I'm with @DannyvdSluijs, this bundle can't set the <?php
namespace App;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\ORM\Mapping\ClassMetadata;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\DependencyInjection\{Compiler\CompilerPassInterface, ContainerBuilder};
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
class Kernel extends BaseKernel implements CompilerPassInterface
{
use MicroKernelTrait;
public function process(ContainerBuilder $container): void
{
$container
->getDefinition("doctrine.orm.configuration")
->addMethodCall("setIdentityGenerationPreferences", [[PostgreSQLPlatform::class => ClassMetadata::GENERATOR_TYPE_SEQUENCE]]);
}
} |
I have deprecation warning as below. But how to fix it?
The text was updated successfully, but these errors were encountered: