DbSqlBuilder b = DbEntitySql.count(g);
assertEquals("select count(*) from GIRL Girl_ where (Girl_.ID=:girl.id and Girl_.NAME=:girl.name and Girl_.SPECIALITY=:girl.speciality)",
b.generateQuery());
checkGirl(b);
BadGirl bg = new BadGirl();
b = DbEntitySql.count(bg);
assertEquals("select count(*) from GIRL BadGirl_ where (1=1)",
b.generateQuery());
bg = new BadGirl(Integer.valueOf(2), null, ".net");
b = DbEntitySql.count(bg);
assertEquals("select count(*) from GIRL BadGirl_ where (BadGirl_.ID=:badGirl.fooid and BadGirl_.SPECIALITY=:badGirl.foospeciality)",
b.generateQuery());
checkBadGirl1(b);