User Profile

User
 danfreak
Location
 Italy
Time Zone
 (GMT 1): Austria, Belgium, Cameroon, France, Germany, Italy, Spain
URL
 http://www.4webby.com

Recent Articles

WhoDidIt behavior: automagic created_by and modified_by fields

WhoDidIt behavior is useful for tracking who has created and modified records: automagically!
  • Published by danfreak 03/01/09 - 17:24
  • 12927 views
  • 17 comments

YAMMY!: DB to YAML table converter for migrations

YAMMY! is the "missing puzzle piece" to the great migrations Shell coded by Joel Moss. YAMMY! provides a fast and convinient way to convert your DB table structure into the right YAML format needed by the migration shell. YAMMY! helps you to deploy faster!
  • Published by danfreak 11/08/07 - 09:44
  • 9515 views
  • 1 comment

Recent Comments

Posted 17/08/2010 04:25am
I got the same problem on mac.

How did you solve it?

Dan

When deployed on Windows 7 with WAMP, the following error appears:

Fatal error: Class 'Router' not found in D:\private\env\Wamp\www\episode\vendors\cake\dispatcher.php on line 281

Did anyone manage to install this CMS on Windows?
Posted 27/08/2009 04:25am
Hi.

Thanks for sharing this useful behaviour. I'm having trouble using it. If anyone could help, I'd appreciate it. I have a hABTM relationship using a joiner table, and for some reason, whodidit tries to look for a created_by column in that table, even though it doesn't have its own model. It's trying a left join with this non-existant column when CakePHP tries to delete from the joiner table, causing the deletes to fail, giving me duplicate rows.

Is there a way around this? Is it a bug in whodidit, or am I just using it incorrectly somehow?

Thank you for your time,
Zoe.

Hey Zoe,

which version of CakePHP are you using?
Can you post your model relationship?
Do you use custom queries?

Dan
Posted 27/08/2009 04:23am
Daniel,

I'm new to Cake and this is my first app using Cake. This is one part of my app that I have been trying to figure out over the last couple of weeks. If this works I will be in hog heaven! My question is that I believe you said that the created_by field has to be int. Is that correct? I'm using cakes UUID and wondering will I still be able to use the behavior.


I didn't try to use UUID, but I guess it should work! Let me know!

Dan
Posted 27/08/2009 04:22am
I like this. Thanks for sharing. I am using it in my project. Although I thought "Whodunit" was a bit more clever as far as naming. Have you considered it?

See also: http://en.wikipedia.org/wiki/Whodunit
It's like Sherlock Holmes. Murder mysteries. Like when good database table rows are bludgeoned to death by ill-mannered users. This behavior helps us solve the case.

Cheers for the suggestion Mike! I'm not a native English speaker.... therefore I didn't have probably the best naming idea!
Posted 07/04/2009 04:32am
Hey Jon,

you should use


var $actsAs = array('WhoDidIt');

and not


var $actAs = array('WhoDidIt');

Dan