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

The current head brokes HAS_MANY #29

Open
jira-zz opened this issue Jul 6, 2013 · 4 comments
Open

The current head brokes HAS_MANY #29

jira-zz opened this issue Jul 6, 2013 · 4 comments
Assignees

Comments

@jira-zz
Copy link

jira-zz commented Jul 6, 2013

The current head brokes HAS_MANY relationships. Maybe others too, but I did not tries them).
It uses key from the other table on the primary one.

When I downgraded it started to work.

@cebe
Copy link
Member

cebe commented Jul 7, 2013

Can you provide some code that helps reproducing the problem?

@ghost
Copy link

ghost commented Oct 13, 2013

Hi, I found and fix this proplem.

@samdark
Copy link
Member

samdark commented Oct 14, 2013

@mbukin what was the problem?

@ghost
Copy link

ghost commented Oct 14, 2013

Change at line 121-124:
if(is_array($dependentTableSchema->primaryKey)) // composite PK
$pk=$dependentTableSchema->primaryKey[$index];
else
$pk=$dependentTableSchema->primaryKey;

To:
if(is_array($ownerTableSchema->primaryKey)) // composite PK
$pk=$ownerTableSchema->primaryKey[$index];
else
$pk=$ownerTableSchema->primaryKey;

I found this problem than use composite key in dependent table schema.

@ghost ghost assigned creocoder Oct 14, 2013
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

4 participants