I use database triggers to handle writing UUID's for all of my id's. This is not a PHP solution and may or may not be appropriate for scalability across a wide range of databases. In MySQL a trigger to to add a UUID as the id of a particular table would look like this:
CREATE TRIGGER `posts_id` BEFORE INSERT ON `posts` FOR EACH ROW SET NEW.id = UUID(); Cheers, Divagater On May 30, 11:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Please if you have any working code snippet showing me how to > integrate Daniel Hofstetter (http://cakebaker.42dh.com) Uuid > component into my model, so the autoincrement id is not necesary in > the future... > > Thanks ! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
