ncbo / goo

Graph Oriented Objects (GOO) for Ruby. A RDF/SPARQL based ORM.
http://ncbo.github.io/goo/
Other
15 stars 6 forks source link

By default queries on `where` should only use declared attributes #76

Closed msalvadores closed 11 years ago

msalvadores commented 11 years ago

It is better to only allow where on known attributes by default. There should an optional parameter to search on unknown attributes.

Person.where :name => "x"
#will fail if name is not a known attribute (DSL declared)

Person.where :name => "x"
#will work just fine if :name has been declared

Person.where :name => "x", :only_known => False
#will not fail if name has not been declared.