J
JZ
I have several mysql tables and I would like to start using Active Record
instead of direct sql queries. The problem is I cannot find how to join to
these tables when they have different names for their primary keys. As i
understand AR and Rails assumes "id" as a field name for primary keys. What
if I have totally different names for fields? How to join to such tables
using AR? I couldn't find the answer in API for AR.
instead of direct sql queries. The problem is I cannot find how to join to
these tables when they have different names for their primary keys. As i
understand AR and Rails assumes "id" as a field name for primary keys. What
if I have totally different names for fields? How to join to such tables
using AR? I couldn't find the answer in API for AR.