<rant-mode>Arrgghhhhhh..... unless mysql is *explicitly* compiled with
-DDONT_USE_DEFAULT_FIELDS (and I'm not keen on trying to compile said
beast on my windows box... yuck), any integer type fields declared as NON-NULL
will have a DEFAULT value of 0.... so if no value is supplied in the
insert statement (e.g. a foreign key field, say gallery_id in the exhibit
table in the unittests maybe.... ;-)), then a default value is inserted.
No, this is not considered an error by mysql, despite the data integrity
issues this most clearly raises. Unless you feel like recompiling it
yourself.
WTF? ('scuse my acryonymic French, but this *really* annoys me).
</rant-mode>
This was at least one of the problems that was thrown up with my recent
changes (I created an exhibit without a gallery). Maybe it's time we had
client-side validation against the DataMap at commit time... configurable
on or off in case the end-developer wishes to just use the DB level error
checking, no matter how obtuse the java.sql.Exception messages may be.
My next project perhaps?
Craig
This archive was generated by hypermail 2.0.0 : Wed Jan 01 2003 - 17:50:06 EST