public
Description: The DataMapper Website
Homepage: http://datamapper.org
Clone URL: git://github.com/sam/dm-www.git
Fixed many to many syntax for DM 0.9 has() method

* has :through still requires the cardinality argument because you
  can use has :through for one to one relationships too.
* Updated raw SQL queries to uppercase the keywords making it more
  obvious it is an SQL query and not code
Dan Kubb (author)
Fri May 23 13:26:19 -0700 2008
commit  5c8b79896e98fed058f235012a102dd59bd2d48a
tree    9f59530a966d323fcfc4ace50cc7b6a912b2d8ad
parent  7ae4f6d59926abcd65b9f66a77e43373be4b1759
...
115
116
117
118
 
119
120
121
...
127
128
129
130
131
 
 
132
133
134
...
140
141
142
143
144
 
 
145
146
147
...
115
116
117
 
118
119
120
121
...
127
128
129
 
 
130
131
132
133
134
...
140
141
142
 
 
143
144
145
146
147
0
@@ -115,7 +115,7 @@ has_one :author
0
 <% coderay(:lang => "ruby") do -%>
0
 has 0..n, :comments
0
 belongs_to :blog
0
-has :categories => :categories_posts
0
+has n, :categories => :categories_posts
0
 has 1, :author
0
 <% end %>
0
       </td>
0
@@ -127,8 +127,8 @@ Post.first :order => 'created_at desc'
0
 Post.all 
0
   :conditions => ['active = ?', true]
0
 
0
-database.query %Q{select 1}
0
-database.execute %Q{update posts...}
0
+database.query %Q{SELECT 1}
0
+database.execute %Q{UPDATE posts...}
0
         <% end %>
0
       </td>
0
       <td class="pointer">
0
@@ -140,8 +140,8 @@ Post.first :order => [:created_at.desc]
0
 Post.all 
0
   :conditions => ['active = ?', true]
0
 
0
-repository(:default).adapter.query %Q{select 1}
0
-repository(:default).adapter.execute %Q{update posts...}
0
+repository(:default).adapter.query %Q{SELECT 1}
0
+repository(:default).adapter.execute %Q{UPDATE posts...}
0
         <% end %>
0
       </td>
0
     </tr>

Comments