metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasper Sørensen <i.am.kasper.soren...@gmail.com>
Subject Re: Bug in filter query execution
Date Sat, 28 Mar 2015 18:27:24 GMT
Hmm not really sure. It's a good cause for discussion maybe. I am guessing
that your "id" column is of some String type and not a number type. So when
doing a filter on it MetaModel recognizes that you have passed a different
type (Integer). In this case it "solves" the issue by using the
ToStringComparator. Whether it's a feature, a bug or a place for
improvement ... I am not sure. What do you think?

2015-03-27 13:24 GMT+01:00 Ashish Mukherjee <ashish.mukherjee@gmail.com>:

> Hello,
>
> I am running a query with the following code snippet -
>
> ....
>
> Table[] tables = schema.getTables();
>
> DataSet ds =
>
> dataContext.query().from(tables[0]).select("id").where("id").greaterThan(new
> Integer(1)).execute();
>
> while (ds.next()) {
> Row row = ds.getRow();
> System.out.println(row.getValue(0));
> }
>
> However, I see this log message -
>
> 54 [main] INFO org.apache.metamodel.util.ObjectComparator - Using
> ToStringComparator because no better comparison method could be found
>
> Is this issue being looked at or should it be reported/fixed?
>
> Regards,
> Ashish
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message