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

Circular owner associations #2

Merged
merged 4 commits into from Apr 27, 2015
Merged

Circular owner associations #2

merged 4 commits into from Apr 27, 2015

Conversation

burrows
Copy link
Contributor

@burrows burrows commented Apr 15, 2015

Allows for circular owner associations like the following:

var A = Basis.Model.extend('A', function() {
  this.hasMany('bs', 'B', {inverse: 'as', owner: true});
});

var B = Basis.Model.extend('B', function() {
  this.hasMany('as', 'A', {inverse: 'bs', owner: true});
});

Previously this would have caused the #hasErrors and #hasChanges methods to enter infinite loops. Simply made use of the detectRecursion utility method to detect the loops and abort them.

@burrows burrows mentioned this pull request Apr 15, 2015
burrows added a commit that referenced this pull request Apr 27, 2015
@burrows burrows merged commit 039f14f into master Apr 27, 2015
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

Successfully merging this pull request may close these issues.

None yet

1 participant