Timeline for Designs and practices to guard against erroneous null entries from database
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 6, 2016 at 22:24 | comment | added | jhyot | Your edited code now has one default action for any null value (i.e. it is completely generic). That's very similar to my 2nd option in the original question, i.e. just throw on null and catch it somewhere. But as stated there I need to differentiate the actions based on which value is missing. | |
| Jan 6, 2016 at 14:58 | history | edited | Jon Raynor | CC BY-SA 3.0 | deleted 3401 characters in body |
| Jan 6, 2016 at 14:52 | comment | added | Jon Raynor | Ahhh, I will update my answer based on this. | |
| Jan 5, 2016 at 22:15 | comment | added | jhyot | I think the example code is perfectly understandable also for Java developers. In my situation I already have an ORM in place, so don't need to implement one. But your answer only addresses default values for nulls, whereas in my case actually the much more important case is detecting a null and triggering an action (e.g. inform an admin about the erroneous data). | |
| Jan 5, 2016 at 16:01 | comment | added | Jon Raynor | If someone wants to post the equivalent Java version that would be great... | |
| Jan 5, 2016 at 15:47 | history | answered | Jon Raynor | CC BY-SA 3.0 |