I've been using Cake since 1.1.  Have some projects to migrate to 1.2
RC3/4 now, and have a lot of special conditions in them, for example:
   $searchcriteriaLoad['Load.pickup_date']='>= -!current_date';
now needs to become under 1.2 RC3:
   $searchcriteriaLoad[] = 'Load.pickup_date >= current_date';

Often, I'll check for the existence of an array key, and if it isn't
set, I'll use some appropriate default value there.. For example I
used to be able to do something like this, under the old syntax:
  if(!array_key_exists('Load.pickup_date', $searchcriteriaLoad) {
      $searchcriteriaLoad['Load.pickup_date']='>= -!current_date';  //
limit display of records to new ones only
  }

Well, I don't get to easily do that anymore under the new cake. I
might have a variety of ways the array key could appear now, and now
that the less than, greater than, or whatever else I'm doing is part
of the array key, it's going to create a mountain of work for me.

How are others dealing with converting existing sites over to this new
conditions structure? This is really taking the wind out of my sails
here because I've got probably three days of drudgery and debugging
just to accommodate moving stuff from the right side of the = sign to
the left.

I'm considering keeping the old structure internally, then writing a
'conversion' function to call before passing the conditions over to
cake that would munch the array into the new conditions format as
needed.
Any better, less painful ideas?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to