Doctrine 1
  1. Doctrine 1
  2. DC-568

Make it possible to use microtime as the version value when using Versionable

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: Behaviors
    • Labels:
      None

      Description

      This patch basically makes it possible to pass in a custom auditlog listener as well as providing a new listener that uses microtime to generate the version value's instead of incrementing an integer value starting at 1. This should provide a much better handling for concurrent inserts and should also be faster, since for all but the first version a complex select is necessary in the current implementation.

      Open question is if the accuracy multiplier should be an option or not. Also is there any reason why the column definition doesnt default to an unsigned, not that it matters all that much?

      1. Listener.php.patch
        0.9 kB
        Lukas Kahwe
      2. Microtime.php
        2 kB
        Lukas Kahwe
      3. Versionable.php.patch
        1 kB
        Lukas Kahwe

        Activity

        Hide
        Jonathan H. Wage added a comment -

        Thanks to Lukas this is fixed now.

        Show
        Jonathan H. Wage added a comment - Thanks to Lukas this is fixed now.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Lukas Kahwe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: