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.
Add
Model\AggregateModel
model #817New 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
Add
Model\AggregateModel
model #817Changes from 2 commits
690e1ca
2ee790b
4a9f37c
d566c62
de06f03
ae45471
3dd1ab0
5cb2bf8
68d32d3
8c69320
47fc81d
adb57dc
b6b0852
a974658
a176a33
665eb86
4e2221d
ae0a56a
722cbdf
1f25740
5c40110
d047cd5
cfae1b1
ad9c90a
41637d0
a21ef63
25dc215
f62907b
0f9bbe8
e7639e8
787c5d9
564944c
7353322
e0af1c5
af5333b
9dd61ba
ddc2db3
bcd74c5
a4438ea
79b2743
96f6009
9e95d1c
934041f
8e563e5
a883a75
58b83ee
0540bf9
035f36b
65ada49
abfaabe
12c2c2a
aab0bf9
1a96086
d48a037
e572ff6
3f51e91
a96f9d8
755bf26
081f694
f451c5c
e9edb8b
fcbb43c
254bb67
cdbd07a
da5856f
25c92cb
3db6a8a
9349c88
e2cd2e2
8ae2036
9c9fa6f
2da2f6a
07d1838
5d8ee39
431da2e
1a821a8
8e8bfd5
a46433d
95af333
5520638
c6c8921
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impossible to pass seed for these fields to define field type for example.
It could be in format
['fieldName' => ['type' => 'money']]
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I belive seed should be not allowed. Instead a "virtualized Field" from the source model must be used. Or the field must be added using regular
addField
method.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if
field
should be allowed and also howfx
works. Need to see some usecase example in SQL and tests.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having
is an interesting argument forAggregate
class, but we may use HAVING instead or WHERE when grouping is active in general (before we can analyse if HAVING is really needed)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok for now if we will integrate it for wrapping like now... But keep this unresolved in GH discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not if we wrap as subquery...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related with https://github.com/atk4/data/pull/853/files#diff-7e7810cb7d196a13e4c0b10d1c737e5ead3e3169bd82f6b4c1149dcf67d726f0R384 , I belive wrapping is the only solution,
having
requiresgroup by
across all columns for some DB vendors (even if grouped by some unique column)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO after #946 - traversing may be implemented using model wrapping
but it will require "virtualized Fields" - maybe we should always impl. different persistence fields using specific subobjects