Tablequery Filter Not Applied

This is my first post here, so I hope I’ve put this in the right place.

I am trying to do a simple database query using TableQuery and a single filter. Unfortunately, it doesn’t seem to function the way I’d expect.

When I apply the filter to the TableQuery, it returns all rows, not a filtered subset. Here is the code.

        TableQuery tq = new TableQuery("mytable", pool, new MSSQLGenerator());
        List<Filter> filters = new ArrayList<Filter>();
        filters.add(new Compare.Equal("myrow", "row_value"));
        tq.setFilters(filters);
        container = new SQLContainer(tq);

row count = 10 (incorrect)

If I apply the filter directly to the container, it seems to work. Then it only returns one row.

container = new SQLContainer(tq);
         container.addContainerFilter(new Compare.Equal("myrow", "row_value"));

row count = 1 (correct)

As I understand it, the filters applied to a TableQuery would add a ‘WHILE’ to the query statement. This is what I want, as I’d like to reduce the load on the database. With the filter on the container, I believe it is filtering the data after the actual SQL query. Is this correct? Can you see what I might be doing wrong with the TableQuery?

I am using the Vaadin 7.1.9 jars which I downloaded last week.