Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Inconsistent id's when using boss_db:find #29

runejuhl opened this Issue Aug 9, 2012 · 5 comments


None yet
2 participants

runejuhl commented Aug 9, 2012

When using boss_db:find to look for entries with specific id's, boss_db requires the use of integers only (e.g. 2, clashing with the standard type-integer string (e.g. "tag-2") naming scheme.

15> Tag = boss_db:find("tag-2").  
16> Tag:id().                   
17> boss_db:find(tag, [{id, in, ["tag-2"]}]).
              <<"invalid input syntax for integer: \"tag-2\"">>,
18> boss_db:find(tag, [{id, in, [2]}]).      

So far I've only tried with the pgsql adapter -- I'll try with the mock adapter tomorrow and update the issue accordingly.


runejuhl commented Aug 9, 2012

Works fine with the mock adapter:

2> Tag = tag:new(id, "erlang", false).
3> Tag:save().
4> boss_db:find("tag-1").
5> boss_db:find(tag, [id, in, [1]]).
6> boss_db:find(tag, [id, in, ["tag-1"]]).

runejuhl commented Aug 10, 2012


evanmiller commented Jan 17, 2013

Would love to get this integrated if someone wants to send me a pull request


evanmiller commented Jan 25, 2013

Branch merged, closing

@evanmiller evanmiller closed this Jan 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment