Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      /**
       * Table ID Generator for those poor languages that are missing sequences.
       *
       * WARNING: The Table Id Generator clones a second independent database
       * connection to work correctly. This means using the generator requests that
       * generate IDs will have two open database connections. This is necessary to
       * be safe from transaction failures in the main connection. Make sure to only
       * ever use one TableGenerator otherwise you end up with many connections.
       *
       * TableID Generator does not work with SQLite.
       *
       * The TableGenerator does not take care of creating the SQL Table itself. You
       * should look at the `TableGeneratorSchemaVisitor` to do this for you.
       * Otherwise the schema for a table looks like:
       *
       * CREATE sequences (
       *   sequence_name VARCHAR(255) NOT NULL,
       *   sequence_value INT NOT NULL DEFAULT '1',
       *   sequence_increment_by INT NOT NULL DEFAULT '1',
       *   PRIMARY KEY (table_name)
       * );
       *
       * Technically this generator works as follows:
       *
       * 1. Use a robust transaction serialization level.
       * 2. Open transaction
       * 3. Acquire a read lock on the table row (SELECT .. FOR UPDATE)
       * 4. Increment current value by one and write back to database
       * 5. Commit transaction
       *
       * If you are using a sequence_increment_by value that is larger than one the
       * ID Generator will keep incrementing values until it hits the incrementation
       * gap before issuing another query.
       *
       * If no row is present for a given sequence a new one will be created with the
       * default values 'value' = 1 and 'increment_by' = 1
       *
       * @author Benjamin Eberlei <kontakt@beberlei.de>
       */
      

        Issue Links

          Activity

          Benjamin Eberlei created issue -
          Hide
          Benjamin Eberlei added a comment -

          Implemented under the DDC-450 label, will get into ORM through this implementation.

          Show
          Benjamin Eberlei added a comment - Implemented under the DDC-450 label, will get into ORM through this implementation.
          Benjamin Eberlei made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Benjamin Eberlei made changes -
          Link This issue is required for DDC-450 [ DDC-450 ]
          Benjamin Eberlei made changes -
          Workflow jira [ 13443 ] jira-feedback2 [ 17796 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 17796 ] jira-feedback3 [ 20151 ]

          This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

          • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-223, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

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

              Dates

              • Created:
                Updated:
                Resolved: