FUEL-CMS module file location issue while using $foreign_keys or $belongs_to

102 views Asked by At

hi i was trying to use the $foreign_keys feature as follow

public $foreign_keys = array('continent_id' => array(FUEL_FOLDER => 'continents_model'));

but getting the error

An Error Was Encountered

Unable to locate the file: continents_model.php

same thing happens while i tried to use $belongs_to

the location of those modules were :

\fuel\modules\packages\models 
\fuel\modules\continents\models

my folder structure as per the image

enter image description here

my model code as follow

enter image description here

what change should i do so it can get the model path

1

There are 1 answers

0
DMC On BEST ANSWER

I believe the problem is with using FUEL_FOLDER instead of the name of the module. Try the following instead:

public $foreign_keys = array('continent_id' => array('continents' => 'continents_model'));