# |
Jul 24th 2017, 12:02 |
lorenzo |
@birdy247 did you manage to make progress on your issue? |
# |
Jul 24th 2017, 11:57 |
birdy247 |
:+1: |
# |
Jul 24th 2017, 11:56 |
hmic |
in the form, probably. or match the name with what it expects |
# |
Jul 24th 2017, 11:54 |
birdy247 |
? |
# |
Jul 24th 2017, 11:54 |
birdy247 |
default => $variable |
# |
Jul 24th 2017, 11:54 |
neon1024 |
Pretty sick of this `Cake\Database\Exception: Cannot describe exit_links. It has 0 columns.` |
# |
Jul 24th 2017, 11:52 |
hmic |
why dont you just set the data to a variable? :~ |
# |
Jul 24th 2017, 11:51 |
birdy247 |
Its just to set the defaults in a form with a multple select |
# |
Jul 24th 2017, 11:50 |
hmic |
your answer be: using a middleware |
# |
Jul 24th 2017, 11:49 |
hmic |
birdy247: why would you want to change a request? |
# |
Jul 24th 2017, 11:49 |
birdy247 |
wondering how/if this can be done? |
# |
Jul 24th 2017, 11:49 |
birdy247 |
but now on 3.4 |
# |
Jul 24th 2017, 11:49 |
birdy247 |
$this->request->data['race'] = $allRaces |
# |
Jul 24th 2017, 11:49 |
birdy247 |
I used to do this |
# |
Jul 24th 2017, 10:45 |
birdy247 |
has anyone used mapReduce before? |
# |
Jul 24th 2017, 10:41 |
neon1024 |
I was under the impressions that loadFixtures populated the database |
# |
Jul 24th 2017, 10:40 |
birdy247 |
mapReduce inimidates me |
# |
Jul 24th 2017, 10:40 |
neon1024 |
Not sure why, https://pastebin.com/DzyQum5r |
# |
Jul 24th 2017, 10:39 |
neon1024 |
PDOException: SQLSTATE[HY000]: General error: 1 no such table: articles |
# |
Jul 24th 2017, 10:39 |
neon1024 |
You might be right about the datasource @hmic |
# |
Jul 24th 2017, 10:36 |
birdy247 |
I want to get all payments, group them by the "created" date (the day it happened) and also provide a "count" and a "total" for each day |
# |
Jul 24th 2017, 10:35 |
birdy247 |
I have a list of "payments" |
# |
Jul 24th 2017, 10:35 |
birdy247 |
I *think* I need to use a map/reduce function |
# |
Jul 24th 2017, 09:58 |
hmic |
this is: do something else, come back to it later... |
# |
Jul 24th 2017, 09:56 |
neon1024 |
Guess I’ll just have to keep smashing my head against the desk until it starts working |
# |
Jul 24th 2017, 09:55 |
neon1024 |
The problem is that the controller method is the key part of the plugin |
# |
Jul 24th 2017, 09:54 |
hmic |
my 5ct are only: make sure you have a test datasource defined, and it actually works. |
# |
Jul 24th 2017, 09:54 |
neon1024 |
Testing a controller should be easy, but it isn’t. |
# |
Jul 24th 2017, 09:54 |
neon1024 |
I don’t really have the patience to battle the framework today |
# |
Jul 24th 2017, 09:53 |
neon1024 |
Might have to just skip testing my controller |
# |
Jul 24th 2017, 09:53 |
neon1024 |
So I have defined both |
# |
Jul 24th 2017, 09:53 |
neon1024 |
But they error if you don’t define the test datasource |
# |
Jul 24th 2017, 09:53 |
neon1024 |
Well all the objects default to the default datasource |
# |
Jul 24th 2017, 09:51 |
hmic |
you still need the test datasource defined IMHO |
# |
Jul 24th 2017, 09:51 |
neon1024 |
There isn’t one. I’m using SQLite |
# |
Jul 24th 2017, 09:51 |
hmic |
what does your test database setup look like? |
# |
Jul 24th 2017, 09:50 |
neon1024 |
The core.articles fixture |
# |
Jul 24th 2017, 09:50 |
neon1024 |
I’m getting the same error even with a concrete instance using a fixutre |
# |
Jul 24th 2017, 09:11 |
neon1024 |
Please can someone tell me why I keep seeing this in my tests? `Cake\Database\Exception: Cannot describe articles. It has 0 columns.` seems to be when I mock a table class, I have to define the schema for the mock to get around it. Do tables not support mocking? I’ve been using `$this->getMockForModel()` |
# |
Jul 24th 2017, 09:10 |
cleptric |
Can you gist some code? |
# |
Jul 24th 2017, 09:08 |
irongomme |
I wonder why $_hidden fields are visible when loaded in associated model in a json response ? I've seen issue 7110 closed in cakephp, but I still have this behavior ! |