# |
Sep 11th 2009, 15:53 |
ifunk |
yeh it's happened to me before |
# |
Sep 11th 2009, 15:53 |
tom_m |
but i mean is it more like splitting hairs at that point? |
# |
Sep 11th 2009, 15:53 |
tom_m |
really? |
# |
Sep 11th 2009, 15:53 |
ifunk |
tom_m: yeh, but you can run into that without transactions as well |
# |
Sep 11th 2009, 15:52 |
tom_m |
so if two people save the same exact records at a time with saveAll() ... might as well forget about validation for unique and such huh |
# |
Sep 11th 2009, 15:52 |
ifunk |
tom_m: all i ever see is "begin transaction" and "commit" in logs |
# |
Sep 11th 2009, 15:52 |
icelander |
Is there a way to do phone validation that allows for extensions? |
# |
Sep 11th 2009, 15:52 |
ifunk |
tom_m: i don't think so |
# |
Sep 11th 2009, 15:51 |
tom_m |
does anyone know off the top of their head if saveAll() in cake with the TRANSACTION will lock for update? |
# |
Sep 11th 2009, 15:50 |
ifunk |
then in your component look for $controller->{$criteria_conditions} |
# |
Sep 11th 2009, 15:50 |
ifunk |
into this: 'criteria_conditions' => 'criteria_conditions', |
# |
Sep 11th 2009, 15:49 |
ifunk |
i would prob suggest turning this: 'criteria_conditions' => $criteria_conditions, |
# |
Sep 11th 2009, 15:49 |
ifunk |
ahh yes i see what you're doing |
# |
Sep 11th 2009, 15:48 |
jjwdesign |
Any ideas? |
# |
Sep 11th 2009, 15:48 |
jjwdesign |
I'm not sure how to write that... or call the builder method of the component. |
# |
Sep 11th 2009, 15:47 |
jjwdesign |
var $components... |
# |
Sep 11th 2009, 15:47 |
jjwdesign |
But, the component call is errored. |
# |
Sep 11th 2009, 15:47 |
ifunk |
ahh sweet |
# |
Sep 11th 2009, 15:46 |
jjwdesign |
You can see all of the conditions. |
# |
Sep 11th 2009, 15:46 |
jjwdesign |
There's a controller than I'm working on. |
# |
Sep 11th 2009, 15:45 |
jjwdesign |
http://bin.cakephp.org/view/373306583 |
# |
Sep 11th 2009, 15:45 |
jjwdesign |
!bin |
# |
Sep 11th 2009, 15:45 |
jjwdesign |
I'm a bit lost when it comes to using the component and passing the init var. |
# |
Sep 11th 2009, 15:44 |
ifunk |
been using cake for a while so hopefully i understand them |
# |
Sep 11th 2009, 15:44 |
jjwdesign |
Yes, different types and conditions. |
# |
Sep 11th 2009, 15:44 |
jjwdesign |
How well do you understand components in CakePHP? |
# |
Sep 11th 2009, 15:44 |
ifunk |
might be able to use this for something else we're doing |
# |
Sep 11th 2009, 15:44 |
ifunk |
does it let you specify different conditions per field? |
# |
Sep 11th 2009, 15:43 |
ifunk |
ahh sweet |
# |
Sep 11th 2009, 15:43 |
jjwdesign |
That would be a typical keyword search. |
# |
Sep 11th 2009, 15:43 |
jjwdesign |
array('name' => 'keywords', 'fields' => array('Page.subject','Page.desc'), 'condition' => '=', 'type' => 'string'), |
# |
Sep 11th 2009, 15:43 |
jjwdesign |
Example: |
# |
Sep 11th 2009, 15:43 |
jjwdesign |
It basically allows you to map from Form Fields to DB fields with conditions. |
# |
Sep 11th 2009, 15:42 |
ifunk |
tho i would have put that in a behavior instead of a component |
# |
Sep 11th 2009, 15:42 |
ifunk |
interesting |
# |
Sep 11th 2009, 15:41 |
jjwdesign |
It not tested. |
# |
Sep 11th 2009, 15:41 |
jjwdesign |
It's based on some old non-CakePHP code. |
# |
Sep 11th 2009, 15:40 |
ifunk |
ahh ok, yeh i started down the route of creating a massive conditions array, and doing a few smaller searches, but wondered if there is more elegant way |
# |
Sep 11th 2009, 15:40 |
jjwdesign |
ifunk: take a look at http://bin.cakephp.org/view/1123721359 |
# |
Sep 11th 2009, 15:40 |
jjwdesign |
!bin |
# |
Sep 11th 2009, 15:40 |
jjwdesign |
But, I can't get it working... Still in dev. |