# |
Aug 7th 2008, 00:41 |
TonkaTruck |
haha |
# |
Aug 7th 2008, 00:40 |
TonkaTruck |
Somewhere there is a law professor who is very proud of me for articulating that. |
# |
Aug 7th 2008, 00:39 |
TonkaTruck |
It's a bit counter-intuitive because contain() is either a) semantically inclusive and b) logically exclusive or vise versa. |
# |
Aug 7th 2008, 00:39 |
polerin |
then I can actually start coding |
# |
Aug 7th 2008, 00:39 |
polerin |
thankfully this I should only have one more after this one |
# |
Aug 7th 2008, 00:39 |
polerin |
back to writing fixtures |
# |
Aug 7th 2008, 00:39 |
polerin |
anyhow |
# |
Aug 7th 2008, 00:39 |
polerin |
not 100% but that's my first instinct |
# |
Aug 7th 2008, 00:38 |
polerin |
yes, because they are wanting to make sure contain is correctly fiddling with the recursive setting I think |
# |
Aug 7th 2008, 00:38 |
TonkaTruck |
polerin: did you notice in the contain test cases that they set recursive before contain() ? |
# |
Aug 7th 2008, 00:38 |
polerin |
s/result array/ resultant record/ |
# |
Aug 7th 2008, 00:38 |
polerin |
because cake has to process each result array into the nested result |
# |
Aug 7th 2008, 00:37 |
polerin |
and really really saves processing |
# |
Aug 7th 2008, 00:37 |
TonkaTruck |
polerin: Yeah good point I didn't even think of that. |
# |
Aug 7th 2008, 00:37 |
polerin |
no way, when you have 15 associations and they go deep, contains is WAY easier than going through and unbinding each of them |
# |
Aug 7th 2008, 00:37 |
TonkaTruck |
recursive notwithstanding. |
# |
Aug 7th 2008, 00:37 |
polerin |
(yay limiting fields to needed! ) |
# |
Aug 7th 2008, 00:37 |
TonkaTruck |
I could be very wrong but I would say contain() is more like find() result beautification. |
# |
Aug 7th 2008, 00:36 |
polerin |
TonkaTruck: or reduce the load that M has to get back from the db |
# |
Aug 7th 2008, 00:36 |
polerin |
and contain uses the best of that |
# |
Aug 7th 2008, 00:36 |
polerin |
I used to use the old ModelWhatever->unbindAll(array('except for these')); |
# |
Aug 7th 2008, 00:36 |
TonkaTruck |
So in the MVC world the C team is trying to give the V team something intuitive to work with. |
# |
Aug 7th 2008, 00:36 |
polerin |
contain was the first one of those things that really won me over |
# |
Aug 7th 2008, 00:35 |
TonkaTruck |
Eddie_CRO: One of the things I tried before reading the contain test cases was nesting them, yes...heh. But no...think of it more like "beautify" |
# |
Aug 7th 2008, 00:35 |
polerin |
TonkaTruck: heheh |
# |
Aug 7th 2008, 00:35 |
polerin |
that kind of array nesting makes reading function calls a PITA |
# |
Aug 7th 2008, 00:35 |
polerin |
it works in find, but if you're doing it that deep I would reccomend using model->contain or assigning it to a variable first |
# |
Aug 7th 2008, 00:35 |
TonkaTruck |
polerin: Yes...but in the docs it seems more like "we're working hard to contain the fire on the third floor" |
# |
Aug 7th 2008, 00:34 |
Eddie_CRO |
polerin, Tonka: It seems interesting. So i have to nest contains. Does it work in ->find or i have to use model->Contain? |
# |
Aug 7th 2008, 00:34 |
polerin |
TonkaTruck: think of it more along the lines of "I want my results to contain this information" |
# |
Aug 7th 2008, 00:34 |
batcoder-7 |
objective C is just apples little modification to the language |
# |
Aug 7th 2008, 00:34 |
TonkaTruck |
Eddie_CRO: I was a bit confused semantically on the use of the word contain. It's either "I contained my wide array" or "my array contains..." I prefer to think of it as the latter. |
# |
Aug 7th 2008, 00:34 |
chrysanthemum |
I have fun with PHP, i feel like C would be a drudgery |
# |
Aug 7th 2008, 00:33 |
chrysanthemum |
maybe someday |
# |
Aug 7th 2008, 00:33 |
chrysanthemum |
becuase I want to do some stuff for my iPhone |
# |
Aug 7th 2008, 00:33 |
polerin |
Eddie_CRO: did you see what I meen about where to put the first snippit? |
# |
Aug 7th 2008, 00:33 |
batcoder-7 |
non* |
# |
Aug 7th 2008, 00:33 |
chrysanthemum |
i know, i've been wanting to learn objective C |
# |
Aug 7th 2008, 00:33 |
batcoder-7 |
start with a nin dynamic langauge |
# |
Aug 7th 2008, 00:33 |
polerin |
I need to get back to work |
# |
Aug 7th 2008, 00:33 |
polerin |
anyway |