Many_Many: How To Use A Column That Is Not A Primary Key?

Table A

id

a_column

TABLE B

id

b_column

TABLE_A_TO_B

a_column => a.a_column

b_column => b.id

I know this is NOT standard, but it’s needed for particualar usage of table a.

So, how to specificy a many_many to get "b" rows from "a" model ?

Use this extension; it will help you a lot.

this extension absolutely do not solve my problem …