# |
Jul 6th 2017, 15:50 |
inoas |
build the array, wrap parantheses, quote,... return |
# |
Jul 6th 2017, 15:50 |
sathomsen |
Exactly:P |
# |
Jul 6th 2017, 15:50 |
inoas |
to walk request query or whatever |
# |
Jul 6th 2017, 15:50 |
inoas |
so you can even use an anonymous function in place |
# |
Jul 6th 2017, 15:50 |
cleptric |
@sathomsen Looking at your composer page, there is a v.0.0.6 |
# |
Jul 6th 2017, 15:50 |
eBug |
thanks for helping out |
# |
Jul 6th 2017, 15:50 |
inoas |
I think there is Model->quote or model->quoteField or so |
# |
Jul 6th 2017, 15:49 |
eBug |
i guess there is no other way yes |
# |
Jul 6th 2017, 15:49 |
inoas |
$conditions[] = '(transporte_id,asociado_id,operacion_venta_id) IN (' . $yourGeneratedStringOfIdsThatYouEscaped . ')' |
# |
Jul 6th 2017, 15:48 |
inoas |
and you have to escape it |
# |
Jul 6th 2017, 15:48 |
inoas |
you have to generate the string yourself |
# |
Jul 6th 2017, 15:48 |
inoas |
eBug so what? |
# |
Jul 6th 2017, 15:48 |
sathomsen |
@cleptic it also shows in the repo :S |
# |
Jul 6th 2017, 15:47 |
sathomsen |
I did |
# |
Jul 6th 2017, 15:40 |
cleptric |
Or create a webhook in your Github Account for that repository |
# |
Jul 6th 2017, 15:40 |
cleptric |
There is a update button on the composer page |
# |
Jul 6th 2017, 15:40 |
cleptric |
Did you “updated” it? |
# |
Jul 6th 2017, 15:39 |
sathomsen |
https://packagist.org/packages/sathomsen/cakephp-facebook-auth |
# |
Jul 6th 2017, 15:38 |
sathomsen |
Hey guys, I’m trying to fix a bug in my facebook plugin, and so I’ve uploaded a new version. Somehow composer refuses to realize this. Any ideas? Composer error: Problem 1 - The requested package sathomsen/cakephp-facebook-auth v0.0.6 exists as sathomsen/cakephp-facebook-auth[v0.0.4] but these are rejected by your constraint. |
# |
Jul 6th 2017, 15:37 |
styks1987 |
ok thanks |
# |
Jul 6th 2017, 15:34 |
jeremyharris |
validation too I think |
# |
Jul 6th 2017, 15:34 |
jeremyharris |
styks1987 yes |
# |
Jul 6th 2017, 15:30 |
styks1987 |
beforeMarshal doesn’t get called in the second? |
# |
Jul 6th 2017, 15:30 |
styks1987 |
what is the main difference between patchEntity and $entity->property = ‘new value’? |
# |
Jul 6th 2017, 15:25 |
eBug |
length |
# |
Jul 6th 2017, 15:25 |
eBug |
$lista_ids has a varialbe |
# |
Jul 6th 2017, 15:25 |
eBug |
this is why we have 'conditions' => ['(transporte_id,asociado_id,operacion_venta_id)' => $lista_ids] |
# |
Jul 6th 2017, 15:24 |
eBug |
$conditions[] = '(transporte_id,asociado_id,operacion_venta_id) IN ((80,68,99), (80,78,96), (80,78,86),(80,78,62))' works fine but i'm working with a variable set of objects in IN |
# |
Jul 6th 2017, 15:20 |
inoas |
either make the ORM do what you want, or surrogate key in schema, or virtual column, or sql view, orm + subquery in raw sql, or only raw sql |
# |
Jul 6th 2017, 15:18 |
inoas |
$conditions[] = '(transporte_id,asociado_id,operacion_venta_id) IN ((80,68,99), (80,78,96), (80,78,86),(80,78,62))' |
# |
Jul 6th 2017, 15:18 |
inoas |
erm |
# |
Jul 6th 2017, 15:18 |
inoas |
did you try $conditions['(transporte_id,asociado_id,operacion_venta_id) IN ((80,68,99), (80,78,96), (80,78,86),(80,78,62))'] |
# |
Jul 6th 2017, 15:18 |
inoas |
so why is an SQL VIEW no option? ... you simply concat the 3 ids and it is easy to query with the old orm |
# |
Jul 6th 2017, 15:09 |
eBug |
because $this->request->data['RetiradaTransportePendiente'] returns an array |
# |
Jul 6th 2017, 15:08 |
eBug |
virtual columns isn't an option here |
# |
Jul 6th 2017, 15:07 |
eBug |
i mean WHERE (transporte_id,asociado_id,operacion_venta_id) IN ((80,68,99), (80,78,96), (80,78,86),(80,78,62)) |
# |
Jul 6th 2017, 15:06 |
inoas |
you can use an sql view or virtual column to get around the problem entirely |
# |
Jul 6th 2017, 15:06 |
eBug |
instead I need WHERE (transporte_id,asociado_id,operacion_venta_id) IN ((80,68,99), (80,78,96), (80,78,86),('80,78,62)) |
# |
Jul 6th 2017, 15:06 |
inoas |
you can try $conditions[] = 'raw sql' |
# |
Jul 6th 2017, 15:06 |
inoas |
ebug if you want to do that yourself |
# |
Jul 6th 2017, 15:05 |
eBug |
this is the resulting SQL: WHERE (transporte_id,asociado_id,operacion_venta_id) IN ('80,68,99', '80,78,96', '80,78,86', '80,78,62') |