public
Fork of jeremyevans/sequel
Description: The Database Toolkit for Ruby
Homepage: http://code.google.com/p/ruby-sequel/
Clone URL: git://github.com/pdamer/sequel.git
Document :reciprocal one_to_many association option
jeremyevans (author)
Sun Apr 06 20:49:39 -0700 2008
commit  f1d371ab57b5c5cb4bdacc8516206074c0aa2774
tree    849a63b20ee3fb755ab56c2ffb14487a22d3a29b
parent  e470d0c93ec79935ee0eb8c8b5ef4c5a0c875263
...
78
79
80
 
 
 
 
81
82
83
...
78
79
80
81
82
83
84
85
86
87
0
@@ -78,6 +78,10 @@ module Sequel::Model::Associations
0
   # - :key - foreign key in associated model's table that references
0
   # current model's primary key, as a symbol. Defaults to
0
   # :"#{self.name.underscore}_id".
0
+ # - :reciprocal - the string name of the instance variable of the reciprocal many_to_one association,
0
+ # if it exists. By default, sequel will try to determine it by looking at the
0
+ # associated model's assocations for a many_to_one association that matches
0
+ # the current association's key. Set to nil to not use a reciprocal.
0
   # - :order - the column(s) by which to order the association dataset. Can be a
0
   # singular column or an array.
0
   # * :many_to_many:

Comments

    No one has commented yet.