ParentNullAllowed - Guidance on correct use
[LIST][*]Hello,[/LIST]
can somebody confirm whether the below is conflicting with the correct and intended use of setting ParentNullAllowed false:
1) The childfile field of relation can be "empty" allowing the child to have no record in parentfile.
2) The childfile field of relation can be with data, but there is no matching record with same value in parentfile.
The 1 is obvious and what the ParentNullAllowed is intended for, but will 2 also be a valid use?
I tried to get 2 to work, but it seems that if there is no parent record the data entered in childfile field of relation gets erased at every DD-Save.
I can probably take away the relationship and code my way out of this, but justed wanted to check if the DD could handle it by pushing the right buttons.
Thanks in advance
Carsten
Re: ParentNullAllowed - Guidance on correct use
No.
Case 2 is not supported.
This violates foreign keys rules and relationships
either a row has no relation (nullparentallowed) or it must be a valid parent.
If you want this, then there should not be a relationship defined at all.
Re: ParentNullAllowed - Guidance on correct use
Thanks very much, I can move on like that with peace in mind!