[JIRA] (HHH-14041) H2Dialect does not correctly extract violated constraint names for 23506
by gittenburg (JIRA)
gittenburg ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5eca456... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNmY2MDAzZjZi... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiNmY2MD... ) HHH-14041 ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiNmY2MD... ) H2Dialect does not correctly extract violated constraint names for 23506 ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiNmY2MD... )
Change By: gittenburg ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5eca456... )
For SQLState: 23506 h2 returns for example\[1] :
{noformat}Referential integrity constraint violation: "FK_PROGRESS_CARD: PUBLIC.PROGRESS FOREIGN KEY(CARD_ID) REFERENCES PUBLIC.CARDS(ID) (0)"; SQL statement:insert into progress (due, factor, card_id, user_id) values (?, ?, ?, ?) [23506-200]{noformat}
H2Dialect's ViolatedConstraintNameExtracter currently only strips away everything up to and including {{violation: }}, making {{constraintViolationException.getConstraintName()}} return {{"FK_PROGRESS_CARD: PUBLIC.PROGRESS FOREIGN KEY(CARD_ID) REFERENCES PUBLIC.CARDS(ID) (0)"; SQL statement:}}
{{insert into progress (due, factor, card_id, user_id) values (?, ?, ?, ?) [23506-200]}}, which is obviously wrong.
\[1]: [https://github.com/h2database/h2database/blob/9e2e212cf806fa75cd42437a13a...]
( https://hibernate.atlassian.net/browse/HHH-14041#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14041#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100127- sha1:ff24dc8 )
5 years, 10 months
[JIRA] (HHH-14041) H2Dialect does not correctly extract violated constraint names for 23506
by gittenburg (JIRA)
gittenburg ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5eca456... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYTk5MmVhMDhk... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiYTk5Mm... ) HHH-14041 ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiYTk5Mm... ) H2Dialect does not correctly extract violated constraint names for 23506 ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiYTk5Mm... )
Change By: gittenburg ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5eca456... )
For SQLState: 23506 h2 returns:
{noformat}Referential integrity constraint violation: "FK_PROGRESS_CARD: PUBLIC.PROGRESS FOREIGN KEY(CARD_ID) REFERENCES PUBLIC.CARDS(ID) (0)"; SQL statement:insert into progress (due, factor, card_id, user_id) values (?, ?, ?, ?) [23506-200]{noformat}
H2Dialect's ViolatedConstraintNameExtracter currently only strips away everything up to and including ` {{ violation: ` }} , making {{constraintViolationException.getConstraintName()}} return {{"FK_PROGRESS_CARD: PUBLIC.PROGRESS FOREIGN KEY(CARD_ID) REFERENCES PUBLIC.CARDS(ID) (0)"; SQL statement:}}
{{insert into progress (due, factor, card_id, user_id) values (?, ?, ?, ?) [23506-200]}}, which is obviously wrong.
( https://hibernate.atlassian.net/browse/HHH-14041#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14041#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100127- sha1:ff24dc8 )
5 years, 10 months
[JIRA] (HHH-14041) H2Dialect does not correctly extract violated constraint names
by gittenburg (JIRA)
gittenburg ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5eca456... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTU1NzExZmIw... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiNTU1Nz... ) HHH-14041 ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiNTU1Nz... ) H2Dialect does not correctly extract violated constraint names ( https://hibernate.atlassian.net/browse/HHH-14041?atlOrigin=eyJpIjoiNTU1Nz... )
Change By: gittenburg ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5eca456... )
For SQLState: 23506 h2 returns:
```
{noformat} Referential integrity constraint violation: "FK_PROGRESS_CARD: PUBLIC.PROGRESS FOREIGN KEY(CARD_ID) REFERENCES PUBLIC.CARDS(ID) (0)"; SQL statement:
insert into progress (due, factor, card_id, user_id) values (?, ?, ?, ?) [23506-200] {noformat}
```
H2Dialect's ViolatedConstraintNameExtracter currently only strips away everything up to and including `violation: `, making ` {{ constraintViolationException.getConstraintName() ` }} return ` {{ "FK_PROGRESS_CARD: PUBLIC.PROGRESS FOREIGN KEY(CARD_ID) REFERENCES PUBLIC.CARDS(ID) (0)"; SQL statement: }}
{{ insert into progress (due, factor, card_id, user_id) values (?, ?, ?, ?) [23506-200] ` }} , which is obviously wrong.
( https://hibernate.atlassian.net/browse/HHH-14041#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14041#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100127- sha1:ff24dc8 )
5 years, 10 months