vipsoft / DoctrineDataFixturesExtension

Doctrine Data Fixtures Extension for Behat
MIT License
21 stars 35 forks source link

Detached Reference #27

Closed rdohms closed 10 years ago

rdohms commented 10 years ago

Under this config:

    VIPSoft\DoctrineDataFixturesExtension\Extension:
          lifetime:    scenario
          autoload:    true
          directories: ~
          fixtures:    ~

I have created a feature with 3 scenarios, and a background step. This background step gets a user reference, and uses it in a persist operation of another entity. The first scenario is fine. However when the second scenario kicks in and executes the background step, the user reference it obtains is not contained in the Entity Manager. Thus i get many breaks with "new entities in relationships"

I tried figuring out why this happens, i'm leaning towards something related to the cache stuff i implemented, but i can't get too far in the unit of work details.

I was wondering if you guys or @guilhermeblanco had any ideas or directions to point me at?

robocoder commented 10 years ago

Sorry for the delay in responding. I'll look into it.

robocoder commented 10 years ago

I'm diagnosing a similar problem in #29. It looks like this occurs when using pdo_mysql instead of pdo_sqlite.

rdohms commented 10 years ago

@robocoder as a note I am using pdo_sqlite.

robocoder commented 10 years ago

@rdohms Can you see if 015a766 helps?