Hi,
I'm developing an Adapter to make DataMapper work on Parse. Because of my
meager knowledge about the query in DataMapper, I capture every query which is
not implemented.
def read(query)
model = query.model
params = parse_params_for(query)
storage_name = model.storage_name
response = engine.read storage_name, params
response["results"]
rescue NotImplementedError
log :error, "Unsupported Query:"
log :error, " Model: #{model}"
log :error, " Conditions: #{query.conditions}"
raise NotImplementedError
end
OK, enough context. Now I have a piece of log like this:
[dm-parse][error] Unsupported Query:
[dm-parse][error] Model: Branch
[dm-parse][error] Conditions: (["0 = 1"] AND merchant = #<Merchant
@id="b2EqeMXoio" @created_at=Thu, 05 Jul 2012 12:30:57 +0000 @updated_at=Thu,
05 Jul 2012 12:30:57 +0000 @category="Restaurant" @country=nil @fax=nil
@description=nil @name=nil @pobox=nil @company=nil @phone=nil
@state_or_city=nil @address=nil @website=nil @logo=nil @approved=false>)
Can you see the ["0 = 1"]? After debug the program I found that is an exact
Ruby Array. What kind of collection would construct a DataMapper Query
Condition like that? What does it mean? Thanks in advance.
Best regards,
Zhi-Qiang Lei
[email protected]
--
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.