# |
Apr 28th 2017, 14:34 |
jeremyharris |
you most certainly can use a finder in a table — that’s where they belong. not sure what you mean by “loose function of contain” though |
# |
Apr 28th 2017, 14:33 |
jeremyharris |
does that finder use matching? the point I’m getting at is that the query is likely using matching which adds the _matchingData property. contain will not do that, and if it does, a thousand apps have screamed out in agony |
# |
Apr 28th 2017, 14:33 |
awi |
so I cant use a finder in table or loose function of "contain"? |
# |
Apr 28th 2017, 14:32 |
awi |
jeremyharris well ist has from table innitialize wich uses a finder. |
# |
Apr 28th 2017, 14:31 |
dereuromark |
;) yeah the question is a bit too broad |
# |
Apr 28th 2017, 14:31 |
jeremyharris |
general answer: it’s necessary for any data you want to validate :slightly_smiling_face: |
# |
Apr 28th 2017, 14:30 |
julez |
a general question: is data validation necessary for all fields or just for fields which are generated by usercontent? |
# |
Apr 28th 2017, 14:24 |
awi |
let me see. |
# |
Apr 28th 2017, 14:23 |
jeremyharris |
do you have a `matching()` call in that query as well? |
# |
Apr 28th 2017, 14:16 |
awi |
is this intended to be this way? |
# |
Apr 28th 2017, 14:16 |
awi |
I ran into some problems with contain. somehow contain turns to a _matchingData by cake update vom 3.3 to 3.4 |
# |
Apr 28th 2017, 14:15 |
awi |
hi. |
# |
Apr 28th 2017, 13:34 |
cakephp051 |
hahaha |
# |
Apr 28th 2017, 13:34 |
jeremyharris |
cat across keyboard? |
# |
Apr 28th 2017, 13:34 |
grandfelix |
:,) |
# |
Apr 28th 2017, 13:33 |
grandfelix |
google translate |
# |
Apr 28th 2017, 13:33 |
dereuromark |
? |
# |
Apr 28th 2017, 13:32 |
cakephp051 |
gshsgrjsgjsgrklsgrxjksgrjkgrjrjp |
# |
Apr 28th 2017, 13:32 |
cakephp051 |
qfrakafekkagkgskgskgsbkegsjsgbkogsjkjgrwjpisrxf |
# |
Apr 28th 2017, 13:32 |
cakephp051 |
aefekaefejjkvefeskifeae |
# |
Apr 28th 2017, 13:32 |
cakephp051 |
bshjkafwhlfqehefe |
# |
Apr 28th 2017, 13:31 |
cakephp051 |
jisf;jsffl;jk;;h;hsfhsdghlisgd |
# |
Apr 28th 2017, 13:31 |
cakephp051 |
hi |
# |
Apr 28th 2017, 13:30 |
dereuromark |
Has anyone experiene/insights with http://alistair.cockburn.us/Hexagonal+architecture and (Cake)PHP? |
# |
Apr 28th 2017, 13:27 |
grandfelix |
@btx thanks. Will take a look |
# |
Apr 28th 2017, 13:02 |
btx |
just realized you’re selecting from the same table |
# |
Apr 28th 2017, 13:01 |
btx |
@grandfelix you could also do a contain, and in the contain, sort by created DESC and do limit 1 since technically you’re not selecting any of the related fields |
# |
Apr 28th 2017, 12:59 |
btx |
@grandfelix check out https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions specifically scroll down (just past the list of functions ending with `dayOfWeek`) to the example about selecting concat with inner join. I think that will help |
# |
Apr 28th 2017, 12:57 |
iqu |
hmm. which one is better. create 2 foreign keys / belongsTo or virtual fields via Entity? |
# |
Apr 28th 2017, 12:50 |
admad |
->context()->entity()->getSource() is the right way |
# |
Apr 28th 2017, 12:49 |
rchavik |
list($junk, $model) = pluginSplit($modelSource); |
# |
Apr 28th 2017, 12:49 |
rchavik |
$modelSource = $this->Form->context()->entity()->getSource(); |
# |
Apr 28th 2017, 12:49 |
rchavik |
i hack it this way instead: |
# |
Apr 28th 2017, 12:49 |
rchavik |
i need to create a link on an element with model=Nodesandforeign_key=1, the value of model can change |
# |
Apr 28th 2017, 12:47 |
admad |
rchavik: what exactly are you trying to do? :slightly_smiling_face: |
# |
Apr 28th 2017, 12:46 |
grandfelix |
I need to create query like this. How I could make join and then subquery with cakephp 3 orm ? |
# |
Apr 28th 2017, 12:45 |
hippo |
thanks <3 |
# |
Apr 28th 2017, 12:45 |
steinkel |
np, you are right |
# |
Apr 28th 2017, 12:45 |
hippo |
not a big issue really, was more wondering if I'm just missing the solution, but that's a good idea thanks. |
# |
Apr 28th 2017, 12:44 |
hippo |
ahh ok cool, sorry should've checked the issues. |
# |
Apr 28th 2017, 12:44 |
steinkel |
meanwhile, you could add the modifications to an element and reuse the element from both templates? |