Jaguar-dart/jaguar_orm

Error when using findOneWhere() method

jacksos101 opened this issue · 1 comments

I am trying to use the findOneWhere() method in bean.dart, and am using in the following manner:

myModelBean.findOneWhere((myModel) => myModel.shouldBeFound);

This works fine for the findWhere() method, but with findOneWhere() I am getting the following exception:

Unhandled Exception: type '(dynamic) => bool' is not a subtype of type 'Expression'
E/flutter (21687): 0      Bean.findOneWhere (package:jaguar_query/src/bean/bean.dart:70:36)

Am I passing the right argument to findOneWhere()?

Any advice would be much appreciated :)

Ahhhh sorry, I'm confusing jaguar methods with dart iterable. My mistake..