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

adding augmentSQL & augmentWrite on ManyManyList #3324

Closed
wants to merge 1 commit into from

Conversation

tylerkidd
Copy link
Contributor

ManyManyList was missing augmentSQL and augmentWrite
functionality, therefore limiting capabilities of using DataExtensions.

ManyManyList was missing augmentSQL and augmentWrite
functionality, therefore limiting capabilities of using DataExtensions.
@tylerkidd
Copy link
Contributor Author

Previously Scrutinizer tests were failing... merged in recent 3.1 changes and creating a new pull request.

@tractorcow
Copy link
Contributor

I think we need to take care; augmentSQL and augmentWrite are actually extensions on the dataOBJECT not on the dataquery, datalist, or relation. If you check the code in DataQuery you'll see that the usage relegates this to the dataobject.

$obj = Injector::inst()->get($this->dataClass);
$obj->extend('augmentSQL', $query, $this);

If you want to augment relations, then it's ok to add API, but the context of this is very different to that of the augmentSQL / augmentWrite that exists in the codebase.

I suggest making a completely independent set of extensions which can be added for HasMany and ManyMany relations, and have those extensions added to the foreign class.

I also suggest you demonstrate an example of code that would benefit from these extensions; One which would not be possible without them?

@wilr wilr closed this Feb 8, 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

3 participants