Possible Bug in CUniqueValidator

I possibly found a bug in CUniqueValidator.

Since 1.1 it is possible to ask the ActiveRecord for the old primary key, since it is now easily possible to change the primay key of a record.

So shouldn’t in CUniqueValidator.php the line 108 be changed from

$exists=$objects[0]->getPrimaryKey()!=$object->getPrimaryKey();

to

$exists=$objects[0]->getPrimaryKey()!=$object->getOldPrimaryKey();

?

If a field gets changed together with the primary key, the original solution would always throw an error, that another record with that content already exists.

Best regards

Fixed in trunk