GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: DataMapper Adapters
Homepage: http://www.yehudakatz.com
Clone URL: git://github.com/wycats/dm-adapters.git
Gets Salesforce to work in some edge-cases I was encountering
wycats (author)
Thu Jun 26 16:53:10 -0700 2008
commit  92aab06d532b8ea638e3eab2ae3c1a883a8c451f
tree    24de347f2f4bccdccde0dda7f8d29664061059a0
parent  65ae4746caae18d41c9fd7cf9aa88ffebef34818
...
32
33
34
35
36
37
 
 
 
38
39
 
 
 
 
40
41
42
...
32
33
34
 
 
 
35
36
37
38
39
40
41
42
43
44
45
46
0
@@ -32,11 +32,15 @@ module DataMapper
0
           when Property
0
             "#{prop.field} #{operator}"
0
           when Query::Path
0
- names = prop.relationships.map {|r| r.parent_model.storage_name(repository.name)}.join(".")
0
- names << ".#{prop.field}"
0
- "#{names} #{operator}"
0
+ rels = prop.relationships
0
+ names = rels.map {|r| storage_name(r, repository) }.join(".")
0
+ "#{names}.#{prop.field} #{operator}"
0
           end
0
         end
0
+
0
+ def storage_name(rel, repository)
0
+ rel.parent_model.storage_name(repository.name)
0
+ end
0
         
0
         def order(direction)
0
           "#{direction.property.field} #{direction.direction.to_s.upcase}"

Comments

    No one has commented yet.