Skip to content

Commit

Permalink
fixed docs on using a differenent relationships model
Browse files Browse the repository at this point in the history
  • Loading branch information
David McReynolds committed Oct 6, 2014
1 parent f80675b commit e87fb3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fuel/modules/fuel/views/_docs/general/models.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,12 @@ function __construct()

<p class="important">
By default, FUEL uses the built-in relationships model to save relationship data. However, if you want to change the model, as well as the field names it uses to store the key information,
you can pass the following parameters in your <dfn>has_many</dfn> or <dfn>belongs_to</dfn> properties array: <dfn>fuel_relationships_model</dfn>, <dfn>foreign_key</dfn>, <dfn>candidate_key</dfn>. An Example is below:
you can pass the following parameters in your <dfn>has_many</dfn> or <dfn>belongs_to</dfn> properties array: <dfn>relationships_model</dfn>, <dfn>foreign_key</dfn>, <dfn>candidate_key</dfn>. An Example is below:
</p>
<pre class="brush:php">
class Products_model extends Base_module_model
{
public $has_many = array('attributes' => array('model' => array(FUEL_FOLDER => 'fuel_tags_model'), 'fuel_relationships_model' => 'my_relationship_model', 'foreign_key' => 'my_foreign_key', 'candidate_key' => 'candidate_key'));
public $has_many = array('attributes' => array('model' => array(FUEL_FOLDER => 'fuel_tags_model'), 'relationships_model' => 'my_relationship_model', 'foreign_key' => 'my_foreign_key', 'candidate_key' => 'candidate_key'));

function __construct()
{
Expand Down

0 comments on commit e87fb3b

Please sign in to comment.