Skip to content

Feature custom limit and sort#34

Merged
kaioken merged 2 commits into0.5from
feature-custom-limit-and-sort
Feb 11, 2020
Merged

Feature custom limit and sort#34
kaioken merged 2 commits into0.5from
feature-custom-limit-and-sort

Conversation

@kaioken
Copy link
Member

@kaioken kaioken commented Feb 10, 2020

In order to avoid overwriting the _GET variable , set specific functions

  • Add custom Limit
  • Add custom sort

@todo
Copy link

todo bot commented Feb 10, 2020

This will hurt on compound primary keys.

// @TODO This will hurt on compound primary keys.
$primaryKey = $metaData->getPrimaryKeyAttributes($modelObject)[0];
// We need the table to exist in the query in order for the related sort to work.
// Therefore we add it to comply with this by comparing the primary key to not being NULL.
$this->relationSearchFields[$modelName][] = [
$primaryKey, ':', '$$',


This comment was generated by todo based on a TODO comment in 156b946 in #34. cc @bakaphp.

@kaioken kaioken merged commit f4df718 into 0.5 Feb 11, 2020
@kaioken kaioken deleted the feature-custom-limit-and-sort branch February 11, 2020 17:41
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.

3 participants