Log message #4201632

# At Username Text
# Sep 4th 2019, 16:39 jotpe @alexdd55976 I don't know if this helps you, but for my purpose it is working : https://gist.github.com/julianpollmann/bd2dc4c8092d3d416f5a7bdc8ea68342
# Sep 4th 2019, 16:20 lilhermit I need to wrap that `$query` but for the life of me I can't get it to work
# Sep 4th 2019, 16:20 lilhermit https://pastebin.com/4SNWVG8V
# Sep 4th 2019, 16:16 lilhermit lol
# Sep 4th 2019, 16:12 neon1024 I certainly wouldn’t have appreciated a large flood of code in a PM
# Sep 4th 2019, 16:12 neon1024 You could share your code using a Gist or Pastebin and share the link
# Sep 4th 2019, 16:11 lilhermit I didn't want to flood the channel with my complex explanation and code. Was going to post my solution after
# Sep 4th 2019, 16:09 neon1024 Limiting your support to one person when you have 3,235 other people who might help you seems unwise
# Sep 4th 2019, 16:09 neon1024 :man-shrugging:
# Sep 4th 2019, 16:07 lilhermit @neon1024 I've dm'ed you
# Sep 4th 2019, 16:04 neon1024 Or make a branch in Git or similar to save time reverting
# Sep 4th 2019, 16:04 neon1024 Well perhaps just write a new method in the controller and see what it looks like
# Sep 4th 2019, 16:03 slackebot Action: lilhermit tries to adapt
# Sep 4th 2019, 15:55 neon1024 Does this kind of thing not work then?
# Sep 4th 2019, 15:55 slackebot <neon1024>
# Sep 4th 2019, 15:53 lilhermit OK I'll take a look
# Sep 4th 2019, 15:53 neon1024 https://book.cakephp.org/3.0/en/orm/query-builder.html#unions
# Sep 4th 2019, 15:53 lilhermit I'm trying to do that
# Sep 4th 2019, 15:52 neon1024 There is a whole bit in the book about sub-queries
# Sep 4th 2019, 15:52 neon1024 So you’re doing `SELECT * FROM (SELECT x,y FROM..` query?
# Sep 4th 2019, 15:45 neon1024 No idea then, I’m afraid.
# Sep 4th 2019, 15:45 neon1024 I would question the need for a Union, but I’m sure there is a reason
# Sep 4th 2019, 15:44 lilhermit yes I have a union and my understanding is I need to wrap it so that paginator LIMITs are not added to the first query
# Sep 4th 2019, 15:43 lilhermit yes `->select('*')` adds table name and `as`
# Sep 4th 2019, 15:42 neon1024 As long as you understand the implications of a `SELECT * FROM` query
# Sep 4th 2019, 15:41 neon1024 Did you try `->select('*')` ?
# Sep 4th 2019, 15:41 lilhermit I'm wrapping a query inside a `from` so paginator can will work with a union
# Sep 4th 2019, 15:40 lilhermit Hi, anyone know if to stop QueryBuilder `select` method from add an alias. I want just `select * from ` rather than `select TableName.* as TableName__*`
# Sep 4th 2019, 15:05 neon1024 :thumbsup:
# Sep 4th 2019, 15:04 daniel.upshaw I think it was, thanks so much @neon1024
# Sep 4th 2019, 15:02 daniel.upshaw Maybe it's because of the ":"
# Sep 4th 2019, 15:02 daniel.upshaw Got it!
# Sep 4th 2019, 14:57 neon1024 Nor does your call to `->setPass()`
# Sep 4th 2019, 14:56 neon1024 https://book.cakephp.org/3.0/en/development/routing.html#route-elements
# Sep 4th 2019, 14:56 neon1024 Routes are matches sequentially, also your `->setPatterns()` call doesn’t need the `:`
# Sep 4th 2019, 14:53 slackebot resulting in a 404
# Sep 4th 2019, 14:53 daniel.upshaw Investigating something odd with routes, not sure if anyone has run into this before... It seems to consume a route, disregarding the pattern, just based on the path parts E.g. ``` $routes->connect('/archive/:year', ['controller' => 'Posts', 'action' => 'index'] )->setPatterns([':year' => '\d{4}'])->setPass([':year']);``` Seems that this will consume `/archive/abcefg` even though it does not match the year pattern,
# Sep 4th 2019, 14:10 davorminchorov Ok I solved it with allowEmptyString using a closure as a $when parameter
# Sep 4th 2019, 14:08 val Hi, is there an alternative for `flushQueryCache()` method in 3.x?
# Sep 4th 2019, 13:59 jotpe ah, it's get_class + Reflection
# Sep 4th 2019, 13:58 ricksaccous I think that's how it works anyway