Discussion:
[Modeling-users] initial value of required fields
John Lenton
2004-07-21 13:18:03 UTC
Permalink
Sébastien, would having an option for required fields being
initialized to non-null values be ok with you?

In a project I'm overseeing the team finds it unnatural that a
required field that isn't filled in won't raise an exception, and I
thought the easy way out (while I thump them with a
validate-everything stick) would be to make it optional...
--
John Lenton (***@gmail.com) -- Random fortune:
bash: fortune: command not found
John Lenton
2004-07-21 13:51:07 UTC
Permalink
Post by John Lenton
Sébastien, would having an option for required fields being
initialized to non-null values be ok with you?
In a project I'm overseeing the team finds it unnatural that a
required field that isn't filled in won't raise an exception, and I
thought the easy way out (while I thump them with a
validate-everything stick) would be to make it optional...
FWIW, now they're using defaultValue to do the same thing... and maybe
that's enough.
--
John Lenton (***@gmail.com) -- Random fortune:
bash: fortune: command not found
Sebastien Bigaret
2004-07-21 15:36:08 UTC
Permalink
Post by John Lenton
Post by John Lenton
Sébastien, would having an option for required fields being
initialized to non-null values be ok with you?
In a project I'm overseeing the team finds it unnatural that a
required field that isn't filled in won't raise an exception, and I
thought the easy way out (while I thump them with a
validate-everything stick) would be to make it optional...
Sorry, but I'm not sure to understand: are you facing situations where
objects with None value in required field did not make ec.saveChanges()
raise?
Post by John Lenton
FWIW, now they're using defaultValue to do the same thing... and maybe
that's enough.
If tyhis is just a matter of initialization then yes, the default values
should be enough, or am I missing something?

-- Sébastien.
John Lenton
2004-07-21 15:39:10 UTC
Permalink
On 21 Jul 2004 19:34:35 +0200, Sebastien Bigaret
Post by Sebastien Bigaret
Post by John Lenton
Post by John Lenton
Sébastien, would having an option for required fields being
initialized to non-null values be ok with you?
In a project I'm overseeing the team finds it unnatural that a
required field that isn't filled in won't raise an exception, and I
thought the easy way out (while I thump them with a
validate-everything stick) would be to make it optional...
Sorry, but I'm not sure to understand: are you facing situations where
objects with None value in required field did not make ec.saveChanges()
raise?
Post by John Lenton
FWIW, now they're using defaultValue to do the same thing... and maybe
that's enough.
If tyhis is just a matter of initialization then yes, the default values
should be enough, or am I missing something?
no, you're not. Just initialization. The first mail went out before I
was reminded of defaultValue... and further tests confirmed that it
was what we wanted. Should've let you know; sorry.
--
John Lenton (***@gmail.com) -- Random fortune:
bash: fortune: command not found
Loading...