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

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

Commit fada39a17e09f3d9a638cf0d272e3f83613e5db6 in openjpa's branch 
refs/heads/master from Paulo Cristovão de Araújo Silva Filho
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=fada39a17 ]

Merge pull request #160 from apache/OPENJPA-2959

[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