When I do this:
query.where().eq("user.primaryRole", myRole);
I get this:
No ScalarType registered for class ...model.Role
Is it possible to configure Ebean so it works like JPA in this regard?
JPA would do the comparison on the id properties. In this case I could
just do:
query.where().eq("user.primaryRole.id", myRole.getId());
but it would be real handy for an IN clause with a collection of
roles.
Thanks.
/Daryl
On Mar 3, 9:36 pm, Rob Bygrave <robin.bygr...@gmail.com> wrote:
> > query.where().eq("user.primaryRole", myRole);
>
> Actually this should work for eq for a ManyToOne (but not for in) ... can
> you post up your code / example.
I actually made up the eq version above, I never tried it. Sorry, bad
example. My case is actually the IN variation.
/Daryl
Ok, can I make a feature request, then? Right now I have to do this:
query.where().in("consultant.id",
IdentifiableUtils.extractIds(consultants));
(IdentifiableUtils.extractIds returns List<Object>, really
List<Integer> in my case)
I'd prefer this:
query.where().in("consultant", consultants);
/Daryl