title: Problem with db4o (java) when running a query
body: <p>I'm glancing through parts of the <a href="http://www.db4o.com/about/productinformation/resources/db4o-7.4-tutorial-java.pdf" rel="nofollow noreferrer">official db4o tutorial</a>, and I'm trying to make a modification to the code they give you for running native queries:</p>
  
  <pre><code>//the original
  List&lt;Pilot&gt; pilots = db.query(new Predicate&lt;Pilot&gt;() {
      public boolean match(Pilot pilot) {
          return pilot.getPoints() == 100;
      }
  });
  
  //modified
  List&lt;Pilot&gt; pilots = db.query(new Predicate&lt;Pilot&gt;() {
      public boolean match(Pilot pilot) {
          return pilot.getGames() &gt;= 100;
      }
  });
  </code></pre>
  
  <p>I've added this to their Pilot class:</p>
  
  <pre><code>//in declarations
  private ArrayList&lt;String&gt; games;  
  
  //modified constructors
  public Pilot() {
      this.name=null;
      this.points=0;
  }
  public Pilot(String name,int points) {
      this.name=name;
      this.points=points;
      this.games = new ArrayList&lt;String&gt;();
      int numGames = (int) (Math.random() * 1000 + 1);
      for(int i=0;i&lt;numGames;i++) {
          this.games.add(name=" vs Computer");
      }
  }
  
  //new method
  public int getGames() {
      return games.size();
  }
  </code></pre>
  
  <p>I've already populated a database with 500 objects using the second constructor, and all the data in the db looks correct with the OME eclipse addon. I've tested getGames() and it works as expected.</p>
  
  <p>My problem is that when I run the modified query, it returns all the objects in the db and I don't understand why. I've tried changing the query to include a more standard if true, else false structure and changing the query to include requiring a certain amount of points to no avail. Whatever I do, it seems it always evaluates (pilot.getGames() >= 100) to be true.</p>
  
  <p>Can anyone help me as to understand why?</p>