Entity schema name is null on specific env #7337

Closed
opened 2026-01-22 15:50:16 +01:00 by admin · 0 comments
Owner

Originally created by @romain-neil on GitHub (Mar 4, 2024).

Bug Report

Q A
Version 2.18.1 & 2.19.0

Summary

Hello, in test environment using behat, the entities schema name are null (when specified alongs table name, or with specific schema parameter)

So, the differents logs show errors when :

  • inserting a new entity
  • with sequence, failing to find the sequence name

Current behavior

The entity schema name are null when dumped :
$this->em->getMetadataFactory()->getMetadataFor(MyClass::class)->getSchemaName()

I also had to specify the entity sequence schema name on id field (ORM\SequenceGenerator), otherwise the sequence were not found

Logs :
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "log" does not exist 2024-03-04T10:52:31.740067946Z LINE 1: INSERT INTO log (id, ....

How to reproduce

Create a sample entity using doctrine attributes

Expected behavior

The SQL insert contains the entity schema name.

Thanks,

Originally created by @romain-neil on GitHub (Mar 4, 2024). ### Bug Report | Q | A |------------ | ------ | Version | 2.18.1 & 2.19.0 #### Summary Hello, in test environment using behat, the entities schema name are null (when specified alongs table name, or with specific schema parameter) So, the differents logs show errors when : - inserting a new entity - with sequence, failing to find the sequence name #### Current behavior The entity schema name are null when dumped : `$this->em->getMetadataFactory()->getMetadataFor(MyClass::class)->getSchemaName()` I also had to specify the entity sequence schema name on id field (ORM\SequenceGenerator), otherwise the sequence were not found Logs : `SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "log" does not exist 2024-03-04T10:52:31.740067946Z LINE 1: INSERT INTO log (id, ....` #### How to reproduce Create a sample entity using doctrine attributes #### Expected behavior The SQL insert contains the entity schema name. Thanks,
admin closed this issue 2026-01-22 15:50:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7337