Maxim Solodovnik created OPENJPA-2959:
-----------------------------------------

             Summary: dropExcludedTypeTables drops user tables with raw SQL
                 Key: OPENJPA-2959
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2959
             Project: OpenJPA
          Issue Type: Sub-task
          Components: jpa
    Affects Versions: 4.2.0
            Reporter: Maxim Solodovnik
             Fix For: 4.2.0


Discussion thread: 
https://github.com/apache/openjpa/pull/144#discussion_r3683001426


**(high)** `dropExcludedTypeTables` issues a raw `"DROP TABLE " + tableName` 
bypassing the dictionary (no identifier quoting/`toDBName`, no CASCADE 
handling, will fail on Postgres with dependent constraints) and swallows every 
exception at trace level. More fundamentally, dropping a user table because its 
type was excluded from synchronization is destructive - an excluded type may be 
a table managed externally on purpose. Is this only here to make a specific 
test pass? It probably should not ship in production code.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to