# |
Apr 27th 2017, 13:52 |
Lurdekan |
"CursosSequencias" have a number to order them |
# |
Apr 27th 2017, 13:52 |
Lurdekan |
many "CursosSequencias" belong to a single "Cursos" |
# |
Apr 27th 2017, 13:51 |
Lurdekan |
while "CursosSequencias" is a form of extension of "Cursos" |
# |
Apr 27th 2017, 13:51 |
Lurdekan |
is this scenario, the key "codigo" is the primary key of "Cursos" |
# |
Apr 27th 2017, 13:51 |
Lurdekan |
I know I can do it in the query itself, but I really would apreciate if I could do it in the definition |
# |
Apr 27th 2017, 13:50 |
Lurdekan |
$this->hasOne('SequenciasAnteriores', [ 'className' => 'CursosSequencias', 'foreignKey' => 'codigo', 'bindingKey' => 'codigo', 'conditions' => [ 'SequenciasAnteriores.sequencia = (CursosSequencias.sequencia - 1)' ], 'joinType' => 'left', 'strategy' => 'select' ]); |
# |
Apr 27th 2017, 13:50 |
Lurdekan |
this is how I'm defining the association |
# |
Apr 27th 2017, 13:49 |
Lurdekan |
in order to cherrypick the association? |
# |
Apr 27th 2017, 13:49 |
Lurdekan |
other than the binding key? |
# |
Apr 27th 2017, 13:49 |
Lurdekan |
what if I need to pass more parameters from the containing row? |
# |
Apr 27th 2017, 13:49 |
Lurdekan |
that will receive the bindingKey as parameter |
# |
Apr 27th 2017, 13:49 |
Lurdekan |
it will generate a subquery |
# |
Apr 27th 2017, 13:48 |
Lurdekan |
and selects subquery as strategy |
# |
Apr 27th 2017, 13:48 |
Lurdekan |
with a binding key |
# |
Apr 27th 2017, 13:48 |
Lurdekan |
I mean, when you define an association |
# |
Apr 27th 2017, 13:48 |
Lurdekan |
how can I pass more conditions to the association subquery? |
# |
Apr 27th 2017, 13:48 |
Lurdekan |
didn't find it in the docs |
# |
Apr 27th 2017, 13:48 |
Lurdekan |
I need some piece of information |
# |
Apr 27th 2017, 13:48 |
Lurdekan |
how u doin? |
# |
Apr 27th 2017, 13:47 |
Lurdekan |
hello fellas |
# |
Apr 27th 2017, 13:27 |
megan |
:parrotparty: |
# |
Apr 27th 2017, 13:22 |
btx |
41 DAYS TIL CAKEFEST! |
# |
Apr 27th 2017, 13:08 |
inoas |
what's the recommended practise to create where conditions where the left side would clash |
# |
Apr 27th 2017, 12:53 |
inoas |
I can conjunct things with $value but then I will lose injection protection |
# |
Apr 27th 2017, 12:53 |
inoas |
I will only get locale_code LIKE once as it gets overwritten |
# |
Apr 27th 2017, 12:53 |
inoas |
when I run code like this pr($collection->unfold()->map(function($value) { return ['locale_code LIKE' => $value]; })->toArray()); |
# |
Apr 27th 2017, 12:53 |
inoas |
https://gist.github.com/inoas/e127826d9c9be368757169bbb370f2e0#file-find-best-locale-path-sql-L8-L11 |
# |
Apr 27th 2017, 12:53 |
inoas |
on the left side I have always the same (or just 2) identifier |
# |
Apr 27th 2017, 12:48 |
Neon1024 |
https://lh3.googleusercontent.com/-o8JIe_Ojh3g/UP-_1ge3t_I/AAAAAAAAB60/MdeISNEMetc/w500-h277-no/8fy4MdZ.gif |
# |
Apr 27th 2017, 12:48 |
Neon1024 |
American politics feels like this to me |
# |
Apr 27th 2017, 12:40 |
inoas |
without net neutrality the net will transform to a few centralist gateways even faster than ever |
# |
Apr 27th 2017, 12:40 |
inoas |
Neon1024: very concerning |
# |
Apr 27th 2017, 12:33 |
Neon1024 |
This makes me sad, http://www.theverge.com/2017/4/26/15439622/fcc-net-neutrality-internet-freedom-isp-ajit-pai |
# |
Apr 27th 2017, 12:33 |
Neon1024 |
(thumbsup) |
# |
Apr 27th 2017, 12:32 |
birdy247 |
thansk for the tips |
# |
Apr 27th 2017, 12:32 |
birdy247 |
I got that function to "merge" accounts working yesterday |
# |
Apr 27th 2017, 12:32 |
birdy247 |
Hey Neon1024 |
# |
Apr 27th 2017, 12:26 |
Neon1024 |
Afternoon everyone |
# |
Apr 27th 2017, 12:13 |
inoas |
aka using inner join |
# |
Apr 27th 2017, 12:13 |
inoas |
https://gist.github.com/inoas/e127826d9c9be368757169bbb370f2e0#gistcomment-2076285 |
# |
Apr 27th 2017, 12:13 |
inoas |
but this should be transformable to ORM code |