Although this is more of a Postgres related question I am giving it a shot.
I have constructed a criteria object which I use with the CDbCommandBuilder’s createCountCommand and createFindCommand and that works OK.
The problem appeared with the count command on a table with composite primary key.
The postgres error is the following:
SQL: SQLSTATE: Undefined function: 7 ERROR: function count(character varying, integer) does not exist LINE 1: SELECT COUNT(DISTINCT "t".id, "t".library_id) FROM "ab_colle... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Any help or suggestion is appreciated.