# |
May 20th 2019, 15:02 |
dwms |
$query->select([ 'valor_baixa_normal' => $query->func()->sum('(' . $baixa_select1 . ')') ]); |
# |
May 20th 2019, 15:01 |
neon1024 |
Well as it’s a calculated field it will not be marshalled into a float because the schema doesn’t define the data type |
# |
May 20th 2019, 15:01 |
dwms |
because I actually do this |
# |
May 20th 2019, 15:01 |
dwms |
should return in float |
# |
May 20th 2019, 15:01 |
dwms |
eu preciso que o resultado venha em float |
# |
May 20th 2019, 14:57 |
neon1024 |
`(float) $baixa_select1` |
# |
May 20th 2019, 14:57 |
neon1024 |
Sure |
# |
May 20th 2019, 14:56 |
dwms |
help me |
# |
May 20th 2019, 14:56 |
dwms |
neon1024 |
# |
May 20th 2019, 14:48 |
dwms |
should return in float |
# |
May 20th 2019, 14:48 |
dwms |
only the result is returned in string |
# |
May 20th 2019, 14:47 |
dwms |
$query->select([ 'valor_baixa_normal' => $baixa_select1 ]); |
# |
May 20th 2019, 14:47 |
dwms |
$baixa_select1 = $this->Caixa->find() ->select([ 'valor_baixa' => $this->Caixa->find()->func()->sum('Caixa.valor_baixa'), ]) ->where(function (QueryExpression $exp, Query $q) { return $exp->equalFields('Titulo.id', 'Caixa.titulo_id'); }) ->where([ 'Caixa.ativo' => |
# |
May 20th 2019, 14:46 |
dwms |
I use a subquery in my select |
# |
May 20th 2019, 14:45 |
neon1024 |
How can we help? You didn’t ask a question. |
# |
May 20th 2019, 14:43 |
dwms |
alone? |
# |
May 20th 2019, 14:42 |
dwms |
help me |
# |
May 20th 2019, 14:40 |
neon1024 |
Well I can see the BakeView::render method is getting the right file |
# |
May 20th 2019, 14:21 |
neon1024 |
Would explain why it’s falling back to core templates |
# |
May 20th 2019, 14:20 |
neon1024 |
Might be something to investigate I guess |
# |
May 20th 2019, 14:20 |
neon1024 |
> Exception: Return value of Cake\View\View::getTemplatePath() must be of the type string, null returned in [/Users/davidyell/Sites/CakePHP4/vendor/cakephp/cakephp/src/View/View.php, line 414] |
# |
May 20th 2019, 14:10 |
neon1024 |
Just trying to find out where it builds the theme at the moment |
# |
May 20th 2019, 14:10 |
neon1024 |
Doing that currently |
# |
May 20th 2019, 14:03 |
josbeir |
have you digged into the bake code to see whats happening and why it is not happening for you |
# |
May 20th 2019, 13:50 |
neon1024 |
No doubt, I bet it’s something simple which I’ve been staring at for hours and just didn’t see |
# |
May 20th 2019, 13:46 |
berarma |
No prob. Sometimes I get caught in the obvious things. |
# |
May 20th 2019, 13:45 |
neon1024 |
I’m going to try and implement some more verbose output from the shell to get an idea of how it works |
# |
May 20th 2019, 13:44 |
neon1024 |
Thanks, I appreciate the input, but I’ve so far invested about 3 hours into it, so I’ve covered most of them |
# |
May 20th 2019, 13:44 |
berarma |
I'm just recalling usual problems that could be the cause |
# |
May 20th 2019, 13:43 |
neon1024 |
:man-shrugging: |
# |
May 20th 2019, 13:43 |
berarma |
of the file |
# |
May 20th 2019, 13:43 |
neon1024 |
`view.twig` ? |
# |
May 20th 2019, 13:43 |
neon1024 |
Name of what? |
# |
May 20th 2019, 13:43 |
berarma |
Some weird character in the name? |
# |
May 20th 2019, 13:43 |
neon1024 |
…and it’ll write add, edit and index, with the correct templates |
# |
May 20th 2019, 13:42 |
neon1024 |
Plus, you can use `bin/cake bake templates --prefix Admin Questions` |
# |
May 20th 2019, 13:42 |
neon1024 |
Not case, as the file is written correctly |
# |
May 20th 2019, 13:42 |
neon1024 |
So, not file permission as the file is written |
# |
May 20th 2019, 13:41 |
berarma |
@neon1024 file permissions or case? |
# |
May 20th 2019, 13:21 |
neon1024 |
That makes me feel a bit better about not being able to find out then :slightly_smiling_face: |
# |
May 20th 2019, 13:16 |
admad |
@neon1024 i can't think of a reason either why it would have problem only with "view" |