You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be observed in the \Zenstruck\Foundry\Tests\Integration\ORM\EntityRelationship\EntityFactoryRelationshipTestCase::disabling_persistence_cascades_to_children test by checking the UnitOfWork insertions
Unless withoutPersisting is not the same meaning as in doctrine, let me know if i misunderstood something here
foreach ($contact->getTags() as $tag) {
$this->assertNull($tag->id);
++ static::assertFalse(Configuration::instance()->persistence()->isPersisted($tag));
}
i tested if i can enhance the test by a isPersisted check, but this is always returning false despite being scheduled for insert by doctrine
The text was updated successfully, but these errors were encountered:
tandev
changed the title
withoutPersisting schedules for insert
withoutPersisting schedules for insert in Doctrine UnitOfWork
Feb 14, 2025
Hi, im unsureif it was introduced in the latest 2.3.2 version, but it seems like persistance is inconsistently handled.
Factories that have persistence disabled, are still scheduling for insert for children.
This can be observed in the
\Zenstruck\Foundry\Tests\Integration\ORM\EntityRelationship\EntityFactoryRelationshipTestCase::disabling_persistence_cascades_to_children
test by checking the UnitOfWork insertionsUnless withoutPersisting is not the same meaning as in doctrine, let me know if i misunderstood something here
foreach ($contact->getTags() as $tag) { $this->assertNull($tag->id); ++ static::assertFalse(Configuration::instance()->persistence()->isPersisted($tag)); }
i tested if i can enhance the test by a isPersisted check, but this is always returning false despite being scheduled for insert by doctrine
The text was updated successfully, but these errors were encountered: