Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3259

Second level & UnitOfWork inconsistencies

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All

      Description

      Hi!

      I have a lot of entities with entity associations as keys and I'm trying to use second level cache.

      Looking at the method: UnitOfWork::createEntity($className, array $data, &$hints = array())

      • $className: contains the class name
      • $data: contains the raw data (the row coming from the database)

      Enabling the second level cache, DefaultQueryCache::get calls the createEntity method passing a $data that contains object entities and some raw data (https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Cache/DefaultQueryCache.php#L155).

      I think that DefaultQueryCache should not introduce a variant of $data and should create a compatible version of $data.

        Activity

        Hide
        Marco Pivetta added a comment -

        Asmir Mustafic do you have any example of where this may be happening?

        Show
        Marco Pivetta added a comment - Asmir Mustafic do you have any example of where this may be happening?
        Hide
        Asmir Mustafic added a comment -

        https://github.com/doctrine/doctrine2/pull/1114

        This is the same branch of https://github.com/doctrine/doctrine2/pull/1113, plus this commit (https://github.com/goetas/doctrine2/commit/bfbbb9123fd28f7fa053b76895eaa77e00095aa6) that simply involves the second level cache too.
        Travis should fail soon.

        Show
        Asmir Mustafic added a comment - https://github.com/doctrine/doctrine2/pull/1114 This is the same branch of https://github.com/doctrine/doctrine2/pull/1113 , plus this commit ( https://github.com/goetas/doctrine2/commit/bfbbb9123fd28f7fa053b76895eaa77e00095aa6 ) that simply involves the second level cache too. Travis should fail soon.
        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-1114] was closed:
        https://github.com/doctrine/doctrine2/pull/1114

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-1114] was closed: https://github.com/doctrine/doctrine2/pull/1114
        Show
        Asmir Mustafic added a comment - Here the failure https://travis-ci.org/doctrine/doctrine2/jobs/32972996#L402

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Asmir Mustafic
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: