I thought a behavior to insert UUID's would be better suited for this
over the MySQL triggers I was using so I through one together. Here a
link for anyone thats interested:
http://bin.cakephp.org/view/109738435
I am working on posting the behavior to the bakery as well.
Cheers,
Billy
I'd create a behavior. Of course models shouldn't access components,
so the logic from the component should be transferred to the behavior
itself. Something like this: http://pastebin.sk/en/1752/ (not tested,
just quickly written)
Cheers
grigri
On 30 May, 22:53, Langdon Stevenson [EMAIL
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
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`
Interesting solution. I have been generating UUIDs in PHP for one of my
projects as my ISP only offers MySQL 4.x.
Regards,
Langdon
Divagater wrote:
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