boss_db icon indicating copy to clipboard operation
boss_db copied to clipboard

How to find data where field is empty?

Open chakhedik opened this issue 12 years ago • 6 comments

Let say the model is 'something' have field 'id' & 'anything',

A = something:new(id, []), A:save().

boss_db:find(something, [{anything, []}]) or boss_db:find(something, [{anything, ""}]) does not return anything, just an empty list

I've tried the 'equals' & 'matches' also the same.

chakhedik avatar Jun 07 '12 09:06 chakhedik

What adapter are you using?

evanmiller avatar Jun 07 '12 13:06 evanmiller

I use mongodb

chakhedik avatar Jun 08 '12 15:06 chakhedik

Do you have the same problem with other adapters? E.g. the mock adapter

evanmiller avatar Jun 08 '12 16:06 evanmiller

It seems there's no problem with mock adapter, I can find data by empty field, I haven't try any others though, I use mongodb mainly

chakhedik avatar Jun 09 '12 00:06 chakhedik

@chakhedik I'll have a look.

@evanmiller Haven't been following CB lately. Just checked out latest version e001c1a and getting a compilation error when building the framework:

$ make [...] ==> cowboy (get-deps) ==> mochicow (get-deps) ==> aleppo (compile) make: *** [all] Error 1

My config: Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false] Ubuntu 12.04 LTS

Am I missing something?

ghost avatar Jul 18 '12 08:07 ghost

Instead of "make" try

./rebar get-deps ./rebar compile

evanmiller avatar Jan 17 '13 21:01 evanmiller