New structure to construct query joins and orderBy#5
Open
newtongamajr wants to merge 8 commits intoLifeOnScreen:masterfrom
Open
New structure to construct query joins and orderBy#5newtongamajr wants to merge 8 commits intoLifeOnScreen:masterfrom
newtongamajr wants to merge 8 commits intoLifeOnScreen:masterfrom
Conversation
Generated a new structure for sortableRelations output to identify the relation based on column name of the foreign key name.
For better comprehension, foreignKey and ownerKey are obtained from BelongsTo class methods and $qualified is used on both string and array form.
Database connection informed on leftJoin to resolve problems for tables residing on other databases.
Author
|
Hi @janicerar! Have you taken a look at this PR? Best Regards... |
Author
|
Hi @janicerar! Take a look at this PR. Best Regards... |
Hi, @newtongamajr ! With your PR is possible to use recursive relations? Something like this: In Company resource: thanks for your PR and hope it gets approved ASAP. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @janicerar,
This is my contribution for your package to create a simple way to configure $sortRelations, using always a structure of [ '' => '] or ['' => ['<relation-column-1','', ... ']. I've merged my solutions for some problems with @anderly solutions to create a unique and more embracing solution.
Thank's for your great package and for the opportunity of my contribution.