rbygrave/avaje-ebeanorm-server — pull request #6 by jroper (2012-12-03 03:23:25+00:00)
Title: Ensured that setting a null id on Query throws an NPE

The following equivalent two lines of code exhibit different behaviour:

```java
Ebean.find(Foo.class, null);
Ebean.find(Foo.class).where().idEq(null).findUnique();
```

In the first line, an NPE is thrown (as expected, you can't have a null id), in the second line, no NPE is thrown, rather, all rows of the table will be returned when the query is executed so if there was one row in the table, it will be returned even if it doesn't have a null id, and if there are multiple rows in the table, an exception will be thrown. The idEq call has no effect when its value is null.

This pull request makes the two lines of code above exhibit the same behaviour.