OpenJPA
  1. OpenJPA
  2. OPENJPA-798

slices does can not work with sequences properly (no adding objects?)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M2
    • Fix Version/s: 2.0.0-M2
    • Component/s: slice
    • Labels:
      None

      Description

      I can't believe that this was a bug that was existent.. but essentially once I got slices fixed up (see many preceding bugs), it all seems to work fine, except for I can't persist new objects. Essentially the DistributedResultSet is very very buggy, and not implemented properly, so TableJDBCSeq can't do it's job properly ( since it's using the DistributedConnection/PreparedStatement/RestulSet ).

      I just wanted to file the bug to get the word out.. but I basically have to re-write the whole class, So I guess I'll be submitting a patch tomorrow.

      The first bug is that it will drop out the first row from every ResultSet (one per db). It does this because as ResultSets are added, it calls "first", but then most people (and TableJDBCSeq), assume that it's "beforeFirst", so they call "next" expecting it to move to "first". So in TableJDBCSeq, it goes beyond the first row, returning null.. and TableJDBCSeq thinks that the query actually returned an empty RestultSet and tries to act accordingly...

      and as you review DistributedResultSet, you see lots and lots of bad logic, missing code, etc. It's a pretty hacked together implementation of a "Distributed ResultSet".... need a proper version..

      1. slices-resultset.diff
        36 kB
        Fernando Padilla

        Activity

        Fernando Padilla created issue -
        Fernando Padilla made changes -
        Field Original Value New Value
        Attachment slices-resultset.diff [ 12394978 ]
        Pinaki Poddar made changes -
        Component/s kernel [ 12311302 ]
        Component/s slice [ 12312619 ]
        Pinaki Poddar made changes -
        Assignee Pinaki Poddar [ ppoddar@apache.org ]
        Pinaki Poddar made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-M2 [ 12313483 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Pinaki Poddar
            Reporter:
            Fernando Padilla
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development