This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

spooksie36170
spooksie36170

Hi, I have a problem with querying tables with any ralations. I belive that all relations I've set-up correctly but hav problem with quering anything

I got my $primaryKey in model setup as this: protected $primaryKey = 'product_id';

And errors like this all the time for any kind of relations

An exception has been thrown during the rendering of a template ("SQLSTATE[42S22]: Column not found: 1054 Unknown column '_euro_product_product_category.service_product_id' in 'field list' (SQL: select _euro_product_category.*, _euro_product_product_category.service_product_id as pivot_service_product_id, _euro_product_product_category.category_product_category_id as pivot_category_product_category_id from _euro_product_category inner join _euro_product_product_category on _euro_product_category.product_category_id = _euro_product_product_category.category_product_category_id where _euro_product_product_category.service_product_id = 1002)").

Can somebody could please explaing why October is adding 'service_' prefix to my $primaryKey? I'm not suprised with this error cause it's true that this column doesn't exist but it doesn't help me out where to look for solution since I've set my primary key already to different value that is modified by October...

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.