[Deprecated] DMZ 1.5.4 (DataMapper OverZealous Edition) |
[eluser]lsemel[/eluser]
Is there an elegant way to do a Rails-style counter cache in DMZ Datamapper? The idea is to automatically keep a track of relationship's count within a column, for performance. http://www.idolhands.com/ruby-on-rails/u...ti-models/ The only way I can think to do this is to override save() or create a prepping validation rule, on both sides of the many to many relationship, which seems like a hack. |
Welcome Guest, Not a member yet? Register Sign In |