> I'm migrating a tree backend to cake.
> Unfortunately there are manay functions who depend from this value, as
> they look for "-1" to identify a root entry.
using -1 with the tree behavior will undoubtedly break it or at the
very least make the tree behavior report your tree to be invalid. If
you really really want to break the tree behavior I'd suggest you run
recover and then updateAll(array('parent_id' => -1), array('parent_id'
=> null)); Or some other such permutation. Alternatively - why not
capture the conditions used in the model and replace -1 with null. Or
even better since it's obvious that you need to eventually need to
change this, just do it right first time and replace all the -1s with
nulls.
hth,
AD
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment