Michiel Meeuwissen wrote:
I think Node-fields can never be 'NOT NULL' because there is no way that
data-import can work then.

Yes, I can see that. I propose to simply have MMBase take this into account: if a NODE field is made 'not null', it will issue a warning and ignore the not-null setting. Note that a NODE field CAN be 'required' - however while a required field is normally also automatically 'not null', this does not count for NODE fields.

So procedure is:
- determine if a field is required. If so, set the field 'not null' only if field is not a NODE field. - determine if a field is not-null. If explicitly set to false, set not null to false (overrides required). If set to true, set not-null to true only if field is not a NODE field, otherwise issue a warning.

Note that this emans that 'requieed' is something that is used for validation, while 'not null' is something only concerned with the storage.

--
Pierre van Rooden
Mediapark, C 107 tel. +31 (0)35 6772815
"Anything worth doing is worth overdoing."
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to