This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Not clear message by attempt to delete record with uncommited changes | ||
---|---|---|---|
Product: | db | Reporter: | Roman Mostyka <romanmostyka> |
Component: | Show Data | Assignee: | Shansi 11 <sivashankari> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 152437 |
Description
Roman Mostyka
2008-10-21 09:16:35 UTC
Please remember we are updating a result set or view. Here is how delete the works: If there is a primary key, it will use the value as part of where condition (delete from table ...where key=value), if there is no key then all the columns are used in the where condition, in such case a table could have multiple row with the same value, that triggers to an ambiguous situation. IMO, In this situation the best choice is tell the user that there is no unique row to matchs the row in subject. Most databases does operate the same way, when you try to delete/update an updatable view with ambiguous or duplicate dataset. Data View is something similar to updatable view. There could be minor tweak that we could do in the message, to make the message more clear to our user. Please come up with suggestion if you can... Probably message is the best way. The problem is that I try to remove record with UNIQUE index (primary key), even with uncommitted changes. I had 6 records in a table with id from 1 to 6. I added new record with id 7. Then I changed it's id to 8 and tried to delete. So this row still has unique primary key, but can't be deleted. In this case the problem is that IDE tries to delete record with changed primary key, but it doesn't exist, since this change still wasn't committed. Needs Verification. http://hg.netbeans.org/main/rev/1d8e3f806f89 Verified with build 081117. |