crisu83 / yii-rights

Automatically exported from code.google.com/p/yii-rights
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

CDbException when viewing a user's assignments #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use PosgreSQL
2. Use a user table with a numeric id column
3. Attempt to view assignments for a specific user

What is the expected output? What do you see instead?
Expected: View of the user's assignments.
Actual: CDbException, ERROR: operator does not exist: character varying = 
integer

What version of the product are you using? On what operating system?
rights 1.3.0, Yii 1.1.8, PosgreSQL 9.0.4, PHP 5.3.8, Mac OS X 10.6.8, Safari 5.1

Please provide any additional information below.
PostgreSQL does not allow an integer value to be compared to a varchar column 
without casting.  One solution is to cast the value to the expected column type 
when you bind the value to the sql command.  I have included a patch against 
revision 149 (changes two lines.)

Original issue reported on code.google.com by ks...@qualys.com on 28 Sep 2011 at 1:54

Attachments: