Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Can't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None
    • Environment:
      Symfony 2, linux

      Description

      I want to have a column on a table that by default it takes the value from a sequence.

      I've tried to do something like this:
      /**

      • @ORM\Column(type="integer", unique="true")
      • @ORM\GeneratedValue(strategy="SEQUENCE")
      • @ORM\SequenceGenerator(sequenceName="seq_categorias", initialValue=1, allocationSize=100)
        */
        protected $id_categoria;

      But this doesn't work, it creates de sequence but not the link between the table column and the sequence. Is there any possibility to do something like this? Or any autoincrement default value instead?

      Thanks!

        Activity

        Maria created issue -
        Hide
        Guilherme Blanco added a comment -

        We cannot fix this as sequences only work internally in Doctrine for ID fields.

        Show
        Guilherme Blanco added a comment - We cannot fix this as sequences only work internally in Doctrine for ID fields.
        Guilherme Blanco made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Benjamin Eberlei [ beberlei ] Guilherme Blanco [ guilhermeblanco ]
        Resolution Can't Fix [ 7 ]

        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=DDC-2249, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Maria
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: