I'm using the autofield behavior and its working great:

http://cakeexplorer.wordpress.com/2007/09/10/autofield-behavior-or-how-to-add-additional-columns-to-your-models/

The formatting plugin in that blog has broken the code, here is good version:

http://bin.cakephp.org/view/541695845

And here is how I'm using it (the mask is just formatting):

        var $actsAs = array(
                'AutoField' =>  array ( 'nro_orden_completo' =>
array('fields'=>array('ejercicio','nro_orden'), 'mask'=> '%d-%06d'))
        );

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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