# |
Apr 26th 2019, 18:38 |
ricksaccous |
seems strange sortWhitelist doesn't work |
# |
Apr 26th 2019, 18:37 |
ricksaccous |
oh i see |
# |
Apr 26th 2019, 18:24 |
jnguyen |
I had to check to be sure |
# |
Apr 26th 2019, 18:24 |
jnguyen |
the finder is using a contain |
# |
Apr 26th 2019, 18:24 |
jnguyen |
sorry the assocations were already defined lol |
# |
Apr 26th 2019, 18:23 |
jnguyen |
ah you know what I lied |
# |
Apr 26th 2019, 18:21 |
ricksaccous |
is the association that hard to define without a finder? |
# |
Apr 26th 2019, 18:21 |
ricksaccous |
i've gotten it wrong a couple times |
# |
Apr 26th 2019, 18:21 |
ricksaccous |
also make sure you have sortWhitelist capitalized correctly and everything |
# |
Apr 26th 2019, 18:20 |
ricksaccous |
sounds like a bad idea tbh |
# |
Apr 26th 2019, 18:20 |
jnguyen |
take out sortwhitelist and check the request query for the sort and direction values |
# |
Apr 26th 2019, 18:19 |
jnguyen |
can I just use order instead? |
# |
Apr 26th 2019, 18:18 |
jnguyen |
hm |
# |
Apr 26th 2019, 18:18 |
ricksaccous |
lol |
# |
Apr 26th 2019, 18:18 |
ricksaccous |
yeah the actual associations |
# |
Apr 26th 2019, 18:18 |
jnguyen |
oh you mean the actual associations |
# |
Apr 26th 2019, 18:18 |
ricksaccous |
just paste your code |
# |
Apr 26th 2019, 18:18 |
ricksaccous |
no that's not what i meant |
# |
Apr 26th 2019, 18:17 |
jnguyen |
? |
# |
Apr 26th 2019, 18:17 |
jnguyen |
the pagination component |
# |
Apr 26th 2019, 18:17 |
ricksaccous |
it has a conditions option |
# |
Apr 26th 2019, 18:17 |
ricksaccous |
without using a finder |
# |
Apr 26th 2019, 18:17 |
ricksaccous |
you could use conditions to define the association |
# |
Apr 26th 2019, 18:17 |
jnguyen |
bascially to filter out some data |
# |
Apr 26th 2019, 18:16 |
jnguyen |
yeah |
# |
Apr 26th 2019, 18:16 |
ricksaccous |
are you using a finder because there are conditions? |
# |
Apr 26th 2019, 18:16 |
jnguyen |
hmmm |
# |
Apr 26th 2019, 18:16 |
ricksaccous |
do a join instead? |
# |
Apr 26th 2019, 18:16 |
jnguyen |
is there* |
# |
Apr 26th 2019, 18:16 |
jnguyen |
is any work around? |
# |
Apr 26th 2019, 18:15 |
jnguyen |
ah ok |
# |
Apr 26th 2019, 18:15 |
ricksaccous |
okay yeah i think that's where the problem is |
# |
Apr 26th 2019, 18:15 |
jnguyen |
yes |
# |
Apr 26th 2019, 18:15 |
ricksaccous |
@jnguyen? |
# |
Apr 26th 2019, 18:14 |
ricksaccous |
is the custom finder being used to define an association in this case? |
# |
Apr 26th 2019, 18:12 |
ricksaccous |
hmmmm |
# |
Apr 26th 2019, 18:12 |
ricksaccous |
there is somewhere in the book about limitations on pagination when using custom finders |
# |
Apr 26th 2019, 18:11 |
jnguyen |
ah ok so I can't use sortWhiteList if I use a custom finder? |
# |
Apr 26th 2019, 18:11 |
ricksaccous |
yeah that's the limitations of custom finders with pagination |
# |
Apr 26th 2019, 18:10 |
jnguyen |
Hey guys, so I have a problem when I use the pagination component , when I use a custom finder I'm not able to sort the data |
# |
Apr 26th 2019, 15:09 |
hollistergraham123 |
So right now I set the view var by doing $this->set([‘var’ => $var, ‘_serialize’ => ‘var’]); I am assuming your saying do some sort of getmethod $this->set([‘_serialize’ => array_merge($this->getViewVar(), ‘user’)]); |