On Thu, Jul 8, 2010 at 7:49 PM, DSpaeth <[email protected]> wrote:
> Hello, > > ActiveRecord nows :join_table for has_and_belongs_to_many > associations. > Does DataMapper also provide a parameter like :join_table for > anonymous resources? > > I haven't found anything about this. > > Hi Dieter, in DataMapper I believe the equivalent syntax is: has n, :other_resource, :through => Resource #anonymous In this case DataMapper creates a join table on your behalf. It uses naming conventions that wouldn't surprise anyone used to those in ActiveRecord 'Resource' can be replaced by a join table of your own making also. Just dug up: the cheat page for DataMapper: http://cheat.errtheblog.com/s/datamapper/ Check under associations. Also the main DM page has a mention here. http://datamapper.org/docs/associations.html Example code would be nice of course. I may be in a position to share some of my own in a couple of days - doing a project spike with DM that has a couple of many:many relationships. -- http://richardconroy.blogspot.com -- 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.
