Skip to content

Commit

Permalink
Hardcode /type/property type in load_schema
Browse files Browse the repository at this point in the history
We're only interested in '/type/property's, and it works around the problems where multiple types are present (eg both /type/property & /common/foreign_key_property)
  • Loading branch information
Jonathan del Strother authored and Jonathan del Strother committed Dec 30, 2008
1 parent 5ad4250 commit c75c8eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/freebase.rb
Expand Up @@ -70,7 +70,7 @@ def self.freebase_type
end
def self.load_schema!
self.properties = {}
propobjs = mqlread(:type => '/type/type', :id => self.freebase_type, :properties => [{:name => nil, :id => nil, :type => nil, :expected_type => nil}]).properties
propobjs = mqlread(:type => '/type/type', :id => self.freebase_type, :properties => [{:name => nil, :id => nil, :type => '/type/property', :expected_type => nil}]).properties
propobjs.each {|propobj|
self.properties[propobj.id.split(/\//).last.to_sym] = propobj
}
Expand Down

0 comments on commit c75c8eb

Please sign in to comment.