ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Inconsistency when creating null values #655

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Basically, if you leave an INT field empty in the data editing view, it gives 
that cell a null value. Likewise, if you leave an INT field empty when using 
the Create New Record form, it gives that cell a null value.

However, when you leave a text or varchar empty in the data editing view, it 
gives that cell a value of "". If you leave a varchar or text field empty when 
using the Create New Record form, it gives that cell a null value.

Could we change it so that whenever any field is left empty, the system assumes 
a null is intended (I can't see why and ORDS user would ever want to enter a 
value of "")? typing in "[null value]" should also have the same effect in both 
the editing interface and the Create New Record form, regardless of the 
variable type.

If you can think of valid reasons why an ORDS user might want to record a "" 
value - do let me know! 

What steps will reproduce the problem?
1. Try to enter a null value into the ORDS either via the editing interface or 
via the new record form
2. Note that if you just leave the input box blank in an integer field, this is 
recognized as a null value.
3. Note that if you just leave the input box blank in a text field, this is 
recorded as "". You need to type in "[null value]" for it to be treated as such.
3. At least feel reassured that if you type "[null value]" into an integer 
field, this is indeed recognized as a null value.

When adding a new record, leaving a text field blank creates a Null rather than 
a "".

What is the expected output? What do you see instead?
Basically I worry that it might not be obvious to all users that "" and Null 
are not the same - could we make it more obvious what need to be done to enter 
a Null, at least on the new record form?

Please use labels and text to provide additional information.

Original issue reported on code.google.com by jajwil...@gmail.com on 27 Apr 2015 at 2:49

GoogleCodeExporter commented 9 years ago
This has another consequence: it's possible to select the schema designer 
option that's supposed to make a field mandatory, but then delete the contents 
of a field and leave it empty.

If a field is set not to permit null values, ORDS won't let you add a new 
record unless the field has been completed. But once you've added the record, 
you can delete the contents of the field, and ORDS won't stop you saving it, 
because it doesn't recognize the empty field as a true null.

Original comment by meriel.p...@gmail.com on 8 Jun 2015 at 4:38