Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing primary key in has many relation #174

Open
saleh199 opened this issue Jun 24, 2014 · 3 comments
Open

missing primary key in has many relation #174

saleh199 opened this issue Jun 24, 2014 · 3 comments

Comments

@saleh199
Copy link

when set $has_many variable and execute get_all method i got an error in line 493

public $has_many = array("family_member" => array("model" => "Form_family_model"));

So please edit documentation to this

public $has_many = array( 'comments' => array( 'model' => 'model_comments', 'primary_key' => 'post_id' ) );

Or add this code after line 484

$options["primary_key"] = $this->primary_key;
@jamierumbelow
Copy link
Owner

Thanks for this – could you send in a pull request making the change
yourself? I'll happily merge it.

On 24 June 2014 14:34, Saleh Saiid [email protected] wrote:

when set $has_many variable and execute get_all method i got an error in
line 493

public $has_many = array("family_member" => array("model" => "Form_family_model"));

So please edit documentation to this

public $has_many = array( 'comments' => array( 'model' => 'model_comments', 'primary_key' => 'post_id' ) );

Or add this code after line 484

$options["primary_key"] = $this->primary_key;


Reply to this email directly or view it on GitHub
#174.

Jamie Rumbelow
[email protected]

@rscotten
Copy link

Please pull this request. It would have saved me 30 minutes. :)

@saleh199
Copy link
Author

@rscotten It's already opened #175
@jamierumbelow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants