Set parameter type in QBMapper#14825
Conversation
Signed-off-by: Marius David Wieschollek <git.public@mdns.eu>
dbedd85 to
5aeb8ea
Compare
|
Restarted CI: https://drone.nextcloud.com/nextcloud/server/17277 |
MorrisJobke
left a comment
There was a problem hiding this comment.
Code makes sense and looks good 👍
ChristophWurst
left a comment
There was a problem hiding this comment.
Looks good and has tests 🚀 👍
| * @param Entity $entity The entity to get the types from | ||
| * @param string $property The property of $entity to get the type for | ||
| * @return int | ||
| * @since 16.0.0 |
There was a problem hiding this comment.
protected method, no @since necessary
There was a problem hiding this comment.
Fine with me - it's just additional documentation that's fine here.
There was a problem hiding this comment.
If i do not add a @since tag, autotest will not accept it
$ ./autotest.sh sqlite lib/AppFramework/Db/QBMapperTest.php
Using PHP executable /usr/bin/php
Parsing all files in lib/public for the presence of @since or @deprecated on each method...
@since or @deprecated tag is needed in PHPDoc for OCP\AppFramework\Db\QBMapper::getParameterTypeForProperty
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
This patch sets the parameter type in the insert and update methods of QBMapper based on the field types declared in the Entity. Parameters that can for any reason not be mapped will be mapped to "string" which was also the default before.
Fixes #11236