I am working on a home-grown authorization system. It is very customized for our special requirement. I have to hack DataMapper to get the job done. The more I dig in DM, the more I love it. I can't imagine how much code I have to write to do the same thing if I do it with Java. As a relative new ORM framework, it sure has some corners that might not work well for you, following are some thing I found out in one day:
1. auto_migrate! vs. auto_upgrade!
I also noticed that there is a plugin dm-constraints, I haven't check it out yet, but it seems like the same, here is the code from the plugin:
I filed an issue report on lighthouseapp.com.
UPDATE(Feb-21-2009): Just got the note from Dan Kubb( one of the core DM developers):
"The Collection#destroy! method is actually supposed to bypass all hooks. The way you're doing it by looping over the records and calling each Resource#destroy method is the proper approach to execute each Resources' hooks.
In dm-core 0.10.0 there will be a Collection#destroy method that wraps this up and essentially does the same thing."
This makes a lot of sense. Like always, I really appreciate the attitude of the developers from DM, that is one one the reason I am using DM.
1. auto_migrate! vs. auto_upgrade!
I also noticed that there is a plugin dm-constraints, I haven't check it out yet, but it seems like the same, here is the code from the plugin:
I filed an issue report on lighthouseapp.com.
UPDATE(Feb-21-2009): Just got the note from Dan Kubb( one of the core DM developers):
"The Collection#destroy! method is actually supposed to bypass all hooks. The way you're doing it by looping over the records and calling each Resource#destroy method is the proper approach to execute each Resources' hooks.
In dm-core 0.10.0 there will be a Collection#destroy method that wraps this up and essentially does the same thing."
This makes a lot of sense. Like always, I really appreciate the attitude of the developers from DM, that is one one the reason I am using DM.
