Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: getChildren() method of AbstractObject results in doctrine SyntaxErrorException error when object has null id #11104

@rjankiew

Description

@rjankiew

Expected behavior

when calling ->getChildren() on newly created object (before the first save), empty array should be returned.

Actual behavior

In version 10.2.7 (not sure in which version exactly this change happened) newly created objects have id=null before the first save. As a result, Doctrine\DBAL\Exception\SyntaxErrorException exception is thrown.

Steps to reproduce

Create a new object of class that inherits from AbstractObject class. Do not save that object. Call ->getChildren() method on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions