Using primary key that is not named "id"


I am using a legacy database that the primary key is named “ProductID”
and its type is SERIAL (or INT NOT NULL auto_increment).

set_primary_key “ProductID”, is added to the Product class

Then I used >ruby script/generate scaffold Product Admin
to generate my controllers. When I try to insert a new product in the
products table, it gave me this error

RuntimeError: ERROR C42P01 Mrelation “product_productid_seq” does not
exist Fnamespace.c L195 RRangeVarGetRelid: SELECT

What does this mean and is what can I do to solve this?

Thank you!