[ 
https://issues.apache.org/jira/browse/OPENJPA-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106616#comment-18106616
 ] 

ASF subversion and git services commented on OPENJPA-2959:
----------------------------------------------------------

Commit c69b105c80220550522f9fbc20885bcdcd1f9f1d in openjpa's branch 
refs/heads/OPENJPA-2959 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=c69b105c8 ]

[OPENJPA-2959] Do not drop tables of types excluded from schema synchronization


> 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
>            Priority: Major
>             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