Adrian Jones
Adrian Jones
@Toutouwai - yeah, I know but it's such a weird inconsistency that it regularly trips me up. We're often telling beginners to check if a page is returned by using...
Maybe you're right that better docs would help, but I still don't think it's good that `find` returns an empty PageArray, but `get` returns `null`. It just doesn't seem logical...
> Also, any type of array is a container, something that can be empty (0 items) or non-empty (1+ items), and these kinds of array types should not return null...
I understand that $pages is not an array. I am obviously not explaining my point properly, so I'll try again. It would be a breaking change so it's not going...
> but you are still coming from the idea that a method like findOne() or get() is supposed to work the same between $pages and a PageArray. Yeah - I...
Personally I think it should be kept open just in case Ryan decides at some point that breaking changes would be acceptable because improved consistency would definitely make the API...
@ryancramerdesign, thanks for thinking about this further, but I am not sure this is about PageArray vs WireArray. The mentioned inconsistencies are about differences in what is returned from in-memory...
Just pinging because I updated the examples above from my initial version of that post.
Actually, I just realized that appending the date IDs doesn't actually work, because if a new date page is added, then then cache still won't be refreshed, so OR groups...
@ryancramerdesign - I would also love to see this feature - being able to filter by length would be an excellent performance boost. Currently I have to loop through thousands...