glassfish
  1. glassfish
  2. GLASSFISH-335

Generator Table of TableGenerator getting dirty + no PK on name column with derby

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      335

      Description

      Running on b39 with XP ...

      After a few deploy/undeploy with drop/create the generator table is getting very
      dirty with multiple rows holding the same "SEQ_NAME" (pkColumnName) +
      "SEQ_COUNT" (pkColumnValue).

      IMHO, if a tuple x(SEQ_NAME,SEQ_COUNT) is already existing do we need to
      recreate it ?

      This is also a problem with the face the spec talks on §9.1.36 of "primary key"
      and that the generated table in Derby is not using any PK at all !

      table generator needs to be revised with real PK and trying to keep this table
      clean whatever is the runtime scenario ...

      TableGenerator is a key feature for legal identifiers that makes mandatory the
      id to sequential and continuous (for instance invoice numbers).

        Activity

        Hide
        marina vatkina added a comment -

        ...

        Show
        marina vatkina added a comment - ...
        Hide
        pramodgo added a comment -

        Working on this issue

        Show
        pramodgo added a comment - Working on this issue
        Hide
        bjb added a comment -

        Great, please also ensure that other databases flavor (mySQL, PostgreSQL) will
        be aligned on any changes done to java2db this as well.

        Show
        bjb added a comment - Great, please also ensure that other databases flavor (mySQL, PostgreSQL) will be aligned on any changes done to java2db this as well.
        Hide
        pramodgo added a comment -

        The code changes that are being made as part of this issue are database neutral.
        Have ensured that when creating the sequence table we define a primary key for
        the sequence name.

        Show
        pramodgo added a comment - The code changes that are being made as part of this issue are database neutral. Have ensured that when creating the sequence table we define a primary key for the sequence name.

          People

          • Assignee:
            pramodgo
            Reporter:
            bjb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: