DDC-380: Bug in persisting entity #473

Closed
opened 2026-01-22 12:39:27 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 26, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user quest:

Maybe I found a small bug.

Following hierarchy:
Class1 extends a mapped superclass
Class2 extends Class1

createdBy is an attribute of the mapped superclass.

Persisting an object of class1 works fine.
Persisting an object of class2 results in this error:
Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'createdBy' in
'field list''

Best thing of this error: This column exists in database!

I fetched the SQL-command that is used here by adding
echo $stmt->queryString . "
";
to Doctrine/orm/persisters/StandardEntityPersister.php line 173

Last output before error:
INSERT INTO Menu (name, slug, title, created, createdBy, updated,
updatedBy, updatedReason, panel, contenttext, active, published,
menuType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

As said before, all these columns exist in table Menu.

Originally created by @doctrinebot on GitHub (Feb 26, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user quest: Maybe I found a small bug. Following hierarchy: Class1 extends a mapped superclass Class2 extends Class1 createdBy is an attribute of the mapped superclass. Persisting an object of class1 works fine. Persisting an object of class2 results in this error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'createdBy' in 'field list'' Best thing of this error: This column exists in database! I fetched the SQL-command that is used here by adding echo $stmt->queryString . "<br>"; to Doctrine/orm/persisters/StandardEntityPersister.php line 173 Last output before error: INSERT INTO Menu (name, slug, title, created, createdBy, updated, updatedBy, updatedReason, panel, contenttext, active, published, menuType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) As said before, all these columns exist in table Menu.
admin added the Bug label 2026-01-22 12:39:27 +01:00
admin closed this issue 2026-01-22 12:39:28 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 26, 2010):

Comment created by @beberlei:

Thank you for reporting this issue.

Please create a unit-test, in the schema of tests\Doctrine\Tests\ORM\Functional\Ticket with entities and a failing test-case and attach it as a .patch or .diff or .php file.

@doctrinebot commented on GitHub (Feb 26, 2010): Comment created by @beberlei: Thank you for reporting this issue. Please create a unit-test, in the schema of tests\Doctrine\Tests\ORM\Functional\Ticket with entities and a failing test-case and attach it as a .patch or .diff or .php file.
Author
Owner

@doctrinebot commented on GitHub (Mar 20, 2010):

Comment created by @beberlei:

I need another information, what type of inheritance type is defined for Class1 <-> Class2 Relationship?

Can you give a mapping example for your case?

@doctrinebot commented on GitHub (Mar 20, 2010): Comment created by @beberlei: I need another information, what type of inheritance type is defined for Class1 <-> Class2 Relationship? Can you give a mapping example for your case?
Author
Owner

@doctrinebot commented on GitHub (Mar 28, 2010):

Comment created by @beberlei:

Cannot reproduce this issue without further information, downgrading issue priority and timeframe.

@doctrinebot commented on GitHub (Mar 28, 2010): Comment created by @beberlei: Cannot reproduce this issue without further information, downgrading issue priority and timeframe.
Author
Owner

@doctrinebot commented on GitHub (Jul 28, 2010):

Comment created by @beberlei:

Closed, no further user input was given.

@doctrinebot commented on GitHub (Jul 28, 2010): Comment created by @beberlei: Closed, no further user input was given.
Author
Owner

@doctrinebot commented on GitHub (Jul 28, 2010):

Issue was closed with resolution "Incomplete"

@doctrinebot commented on GitHub (Jul 28, 2010): Issue was closed with resolution "Incomplete"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#473