type mismatch with ruby-db2 when using set_primary_key

M

Michael Hubbard

I have successfully installed ruby-db2-0.4.4.
I have successfully connected to DB2 and have displayed the one table
that I generated a model for. My problem is that this table is part of
a legacy app and so it does not follow the standards for Rails. My
primary key for this table is called PKEY instead of id. When I modify
my model for this table and add set_primary_key "pkey", my sql fails and
I see that the generated sql looks exactly right except for the places
that reference PKEY use it as if it were a varchar or char field.
(things like : where table.pkey = '408'). My PKEY field is defined in
the table as a BIGINT. Am I looking at a problem with ruby-db2 or am I
just still too new at this?

Thanks
Mike Hubbard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top