I notice from the backtrace that this is in a web app. I'm guessing
when you call '(get-record id)' that id is a String pulled from
params. If so, can you try converting it with something like
'(get-record (Integer/parseInt id))'?
Assuming that is the issue, should get-record be modified to accept a
String argument and do this conversion? How are others handling this
already?
Thanks.
-hume.
On Mon, Oct 4, 2010 at 6:28 AM, edoloughlin <ed.olo...@gmail.com> wrote:
> I'm using the Postgres 'serial' type for a primary key:
>
> CREATE TABLE "users" ("id" serial primary key);
>
> When I call '(get-record id)' on my model, I get an exception warning
> about an invalid type.
>
> I'm using Postgres 8.4.4 with postgresql-9.0-801.jdbc4.jar.
>
> Is there a way of telling clj-record that the primary key isn't a
> 'character varying'?
>
> Here's the stack trace:
>
> org.postgresql.util.PSQLException: ERROR: operator does not exist:
> integer = character varying
> Hint: No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
...