hi,

I have a common model named Post with obvious attributes like title, 
content, etc. I'm using dm-timestamps so I have created_at, updated_at 
automatically generated but I also want to track the evolution of a 
specific Post.

first solution coming to my mind is to create a clone table named like 
post_log and set a sql trigger for updates which takes a snapshot of 
current state of that object into log table so when I query with a specific 
id from post_log table then I can see what happened in time for that 
object. but after getting more and more familiar with datamapper I feel 
like I supposed to use coding first approach rather than tying myself into 
database because it feels more comfortable to let datamapper handle db 
creating/altering jobs. I saw in the documents that I can add some logic 
into Model's save process. but I'm not sure if it is a good idea or not and 
I wonder what approach do you guys use for tracking changes.

thanks,
koray.

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/J2Of6MlaJyAJ.
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/datamapper?hl=en.

Reply via email to