First of all, thanks for this extension. I've started using it and I found something that maybe can be useful.
I've need to validate an unique restriction with null values. For example:
Id Value1 Value2
#1 A B (not valid)
#2 A C
#3 A B (not valid)
#4 B A
#5 B null (not valid)
#6 B null (not valid)
To support this feature I've modified the extension code as follow:
In the function validateCompositeUniqueKeys I've changed
$criteria = new CDbCriteria();
foreach ($uk['attributes'] as $attr) {
$criteria->compare($attr, $object->$attr);
}
for
$criteria = new CDbCriteria();
foreach ($uk['attributes'] as $attr) {
if ($object->$attr === null)
$criteria->addCondition($attr.' is null');
else
$criteria->compare($attr, $object->$attr);
}

Help












