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.

Bug 267365 - CTRL+0 and CTRL+1 do not work for setting null/default values on insert records
Summary: CTRL+0 and CTRL+1 do not work for setting null/default values on insert records
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-30 16:50 UTC by brettryan
Modified: 2016-08-05 01:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brettryan 2016-07-30 16:50:19 UTC
Steps to Reproduce
------------------

1. View data for a table containing various values, include a date column
2. Select a data column and press CTRL+TAB to ensure not in editing mode, repeat and enter string values for string columns.
3. For each column press CTRL+0.
4. Repeat #3 and use CTRL+1


Expected Result
---------------

At step #3 all elements should result as <NULL>, and at step #4 they should appear as <DEFAULT>, inspecting the SQL should show that for #4 the column is not included in the statement.


Actual Result
-------------

These keys flash the data in the field but do not actually work. Setting to default for string fields sets to '' where they should actually remove the value entirely, null also sets to ''.
Comment 1 matthias42 2016-08-03 19:21:17 UTC
The fix was pushed as:

http://hg.netbeans.org/core-main/rev/f12ef8e97f5a

Thank you for noticing this!
Comment 2 Quality Engineering 2016-08-05 01:57:06 UTC
Integrated into 'main-silver', will be available in build *201608050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f12ef8e97f5a
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #267365: Fix setting NULL/DEFAULT value in InsertRecordDialog

A prior fix adjusting the similar behaviour in DataTableUI was ported to
InsertRecordTableUI. By switching SQL constant (NULL, DEFAULT, ...) to
a special enum the behaviour is more consistent and prevents
the bug, that the string values of the constants could not be inserted/
updated.