-
Notifications
You must be signed in to change notification settings - Fork 30
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
Specify parameter-based queries/methods in spec doc #266
Specify parameter-based queries/methods in spec doc #266
Conversation
Signed-off-by: Nathan Rauh <[email protected]>
=== Special Parameter Handling | ||
==== Query by Parameters | ||
|
||
The Query by Parameters pattern determines the query conditions from the names of the method's parameters that are not of type `Limit`, `Sort`, and `Pageable`. Each query condition is an equality comparison, comparing the parameter value against the value of the entity attribute whose name matches the method parameter name. For embedded attributes, the `_` character is used as the delimiter in the method parameter name. All query conditions are implicitly joined by the `And` operator, such that all must match for an entity to be considered matching. |
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 guess we got this discussion somewhere before; annotations such as "Find" could get more flexibility in this case:
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 found it: #223
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 guess we got this discussion somewhere before; annotations such as "Find" could get more flexibility in this case:
It's certainly true that including annotations could add more flexibility here. However, that's a separate proposal, or separate aspect of a proposal, to consider and discuss separately and is not intended to be addressed by this pull. The scope of this pull is to specify what is described under your pull #260 where it states "determining the query from the supplied parameters and the insert
, update
, delete
, find
, count
, or exists
prefix. Query by parameters constructs queries based on method parameters and prefixes."
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.
Yes, I remember this PR, and that is my point: Does it make sense to have insert and update methods?
Should we update to use "DataAcessObject" instead of Repository?
IMHO: we should remove the insert and update and abstract with "save" for a while.
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.
Yes, I remember this PR, and that is my point: Does it make sense to have insert and update methods? Should we update to use "DataAcessObject" instead of Repository?
IMHO: we should remove the insert and update and abstract with "save" for a while.
Well, I'm certainly not happy that I wasted all this effort documenting insert/update based on the fact that your pull added them so I thought you were in favor of them. But if you insist on removing them now, I'll update this pull to do so.
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.
@otaviojava I removed insert and update for you: a83a9d2
da6993e
to
a83a9d2
Compare
Continue the work to fully specify parameter-based queries/methods. This adds on to work done in #260 (precedence rules in spec) and #263 (include in JavaDoc) to ensure these are fully specified in the specification document and that the JavaDoc is consistent with it.