Closed peldax closed 1 week ago
Hi.
First, make sure that the ORM used for querying and the ORM used in EntityManager are the same ORM object.
In rare cases they may be different, for example when the Cycle\ORM\ORM
class is requested from DI rather than Cycle\ORM\ORMInterface
.
Hi,
thanks for your response. Both services are loaded from DI, but I confirm that spl_object_id
of ORM is always the same.
Could you prepare a test case in ORM to have a reproducible sample? The instruction: https://cycle-orm.dev/docs/issue-test-case/current/en
Hi, this one was probably an issue on my side and was resolved locally.
No duplicates š„².
What happened?
Hi,
I am encountering a strange issue, where the ORM tries to re-insert a row into a database. I have a following code:
This code results into a following error:
The templateBlocks is a hasMany relation in template entity. The exam has a belongs to relation to the template.
When dumping the insert queries in
InsertQuery::run()
, the ORM indeed tries to execute a following SQL:The computed set of changes in the Tuple is not an empty array, although the row has been re-fetched by the repository in the first step.
My schema is generated from annotations, but I havent found any issues there. Everything seems to be generated correctly.
Do you have any idea what might be the cause? I tried to find the cause of this issues myself, but I am clueless.
Thanks.
Version