composite key update after insertion

Hi,

I have table with a composite primary key made of 2 columns : id (auto-incremented) and user_id.

After a successful insertion, I’d like to get the value for id … but in vain :(

From what I saw in the CActiveRecord insert method, an auto-incremented primary key is updated only in the case where it is not part of a composite.

$primaryKey=$table->primaryKey;


if($table->sequenceName!==null && is_string($primaryKey) && $this->$primaryKey===null)


	$this->$primaryKey=$builder->getLastInsertID($table);


...

…so how can I do to get the value of id, just after the call to AR.save() ?

8)

i just added support to this case.

ok quiang, thanks …

8)