OpenJPA
  1. OpenJPA
  2. OPENJPA-1760

SchemaAction='refresh,deleteTableContents' incorrectly removes data from ALL DB tables.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0, 2.1.0, 2.2.0
    • Fix Version/s: None
    • Component/s: tooling
    • Labels:
      None
    • Environment:
      Win XP, Postgres 8.4, OpenJPA 2.0.0

      Description

      At my usecase not all tables are managed by openjpa so not all of them are listed with the class-tag inside persistence.xml. I set up openjpa to delete the table contents for developping with the following property:
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='add,deleteTableContents')"/>

      But now all contents are deleted even the one of tables which aren't listed inside persistence.xml.

      Shouldn't openjpa only delete contents from tables which are configured plus the openjpa_sequence_table rather than deleting all contents from the whole database? Is this a bug or is there a property which I have to set to get the described behaviour?

      Greets Oli

        Activity

        Mark Struberg made changes -
        Fix Version/s 2.4.0 [ 12325298 ]
        Mark Struberg made changes -
        Fix Version/s 2.4.0 [ 12325298 ]
        Fix Version/s 2.3.0 [ 12319463 ]
        Albert Lee made changes -
        Fix Version/s 2.3.0 [ 12319463 ]
        Fix Version/s 2.2.0 [ 12315910 ]
        Affects Version/s 2.2.0 [ 12315910 ]
        Michael Dick made changes -
        Fix Version/s 2.2.0 [ 12315910 ]
        Fix Version/s 2.1.0 [ 12314542 ]
        Rick Curtis made changes -
        Assignee Rick Curtis [ curtisr7 ]
        Rick Curtis made changes -
        Attachment OPENJPA-1760_testcase.patch [ 12456599 ]
        Rick Curtis made changes -
        Attachment OPENJPA-1760.patch [ 12456051 ]
        Rick Curtis made changes -
        Summary Should deleteTableContents always delete really ALL content? SchemaAction='refresh,deleteTableContents' incorrectly removes data from ALL DB tables.
        Issue Type Question [ 11 ] Bug [ 1 ]
        Fix Version/s 2.1.0 [ 12314542 ]
        Affects Version/s 2.1.0 [ 12314542 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Component/s tooling [ 12312859 ]
        Rick Curtis made changes -
        Attachment OPENJPA-1760.patch [ 12456051 ]
        Rick Curtis made changes -
        Field Original Value New Value
        Assignee Rick Curtis [ curtisr7 ]
        Oliver Bayer created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Oliver Bayer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development