I just wanted to tell you guys that I'm simply amazed by DataMapper awesomeness.
I had a class model 'Employee' with an associated 'nodes' collection: has n, :nodes, :is_parent => false I also have one of the node collection items marked as "parent" with a constraint, which I have DataMapper create as a 'parent' attribute on Employee: has 1, : parent, :model => 'Node', :is_parent => true I also wanted some attributes of my :parent node exposed directly on Employee, so I used delegation: delegate :name, :name=, :to => :parent Now I have to say that I really didn't expect this to work with respect to DataMapper taking care of cascading updates to :parent when I updated my Employee object and delegated attributes, but it worked! This is pure magic. Thank you, thank you, thank you. -- Scott -- You received this message because you are subscribed to the Google Groups "DataMapper" group. 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.
