maccman/supermodel — Issue #20: If SuperModel support relationships? like belong_to or has_many.
Author: shaoyangyu
Created: 2012-02-29 04:53:14+00:00
State: open

Hi

Not sure if SuperModel supoort relationships, like belong_to or has_many.

class Person
has_many:addresses
end
.....
person.addresses = [ address ]
person.addresses.target #=> returns [ address ]
person.addresses.base #=> returns person
person.addresses.metadata #=> returns the metadata
.....