Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2045

Unit of work use all columns for insert

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      PHP 5.4.7--pl0-gentoo mysql Ver 14.14 Distrib 5.5.22, for Linux (x86_64)

      Description

      I use MySQL. And I'm OK with default values that will be assigned by DB for columns which values I don't set explicitly. But Doctrine seems to unable to skip some columns when building insert SQL query.

      People suggest to use nullable flag to enable desired behaviour. And I don't see how it could help. I checked UnitOfWork.php and BasicEntityPersister.php. There is nothing about nullable.
      And doc http://docs.doctrine-project.org/en/latest/reference/limitations-and-known-issues.html says that you cannot use custom persisters so far.

      So why not track changes for unsaved entities as well, and don't force applications to generate more traffic with more SQL text and developers to set default values in entity constructors?

      I would be glad if I'm mistaken and this feature is already implemented and you describe how to resolve the issue. Thanks

        Activity

        Covie X created issue -
        Covie X made changes -
        Field Original Value New Value
        Environment Linux 3.4.3-gentoo x86_64
        PHP 5.4.7--pl0-gentoo mysql Ver 14.14 Distrib 5.5.22, for Linux (x86_64)
        Marco Pivetta made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Covie X
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: