You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and when i'm trying to iterate over set I'm being given
ArgumentError: The second arg should be a database.
diametric/DiametricPeer.java:270:in `q'
/Users/michalsiemionczyk/.rvm/gems/jruby-1.7.15/gems/diametric-0.1.3-java/lib/diametric/persistence/peer.rb:191:in `q'
/Users/michalsiemionczyk/.rvm/gems/jruby-1.7.15/gems/diametric-0.1.3-java/lib/diametric/query.rb:117:in `each'
/Users/michalsiemionczyk/Projects/yeti-backend/app/services/profiles/filtered_profiles_service.rb:37:in `query_for_date_filtered'
which points to the badges.each do |badge| .
I guess it might a bug relating to definition of filter shortcut method,
The text was updated successfully, but these errors were encountered:
Would you try badges = Badge.filter(nil, :>, :value, 9) ?
The first argument is connection or nil for Peer. The filter shortcut is tested in rspec, but arguments are not the same as REST. Sorry about bad documentation. I added one line in query doc.
Probably, I should consider API design to make it clear.
Hello,
today I've encountered the weird issue.
I have a model "Badge" in my Datomic db, here's it's ruby's representation:
Im relying on
Peer
API, JRuby.I want to get the badges with value >= 10.
Following code works fine:
badges = Diametric::Query.new(Badge, nil, true).filter(:>, :value, 9)
the
badges.inspect
returns#<Diametric::Query:0x33de4104 @conditions={}, @filter_values=[9], @conn_or_db=nil, @filters=[[(> ?value ?valuevalue)]], @model=Badge, @resolve=true, @filter_attrs=[:value]>
and I'm free to iterate over set with
BUT when I'm trying to use shortcut method
badges = Badge.filter(:>, :value, 9)
the
badges.inspect
returns#<Diametric::Query:0x1e7a60f7 @conditions={}, @filter_values=[9], @conn_or_db=:>, @filters=[[(?value ?valuevalue)]], @model=Badge, @resolve=true, @filter_attrs=[:value]>
(please mind the
@conn_or_db
or@filters
keys)and when i'm trying to iterate over set I'm being given
which points to the
badges.each do |badge|
.I guess it might a bug relating to definition of
filter
shortcut method,The text was updated successfully, but these errors were encountered: