anchor.diff:  } catch (NonUniqueResultException nure) {
       return null;
   }
  -{% endhighlight %}
  +----
   
   Here the compiler will give us an error if we write `Uzer.class` instead of `User.class`. So more syntax checking. But as you probably already noticed, `user.get("username")` is still not checked for correct syntax. Our code will successfully compile if we replace `username` with `uzrname`. This is because the compiler doesn’t know if `uzrname` is a property of the `User` class. So we need more syntax checking to prevent these kind of errors. With the help of Java Persistence Metamodel API we can create fully syntactically checked queries.
   
  
positive.code: } catch (NonUniqueResultException nure) {
      return null;
  }
  {% endhighlight %}
  
  These metamodels are pretty useful because our queries are syntactically correct and type-safe&#33; Syntactically correct because all the syntax is checked. We will get an error is we replace `username` by `uzername`. So if we, for example, rename a variable, the compiler will tell us which queries we forgot to update. We won’t get a runtime error.
  
  
negative.code: 
  Because of the metamodels, the compiler knows the type of the variables. So you can’t for example do:
  
  [source, java]
  ----
  try {
      CriteriaBuilder cb = JPA.em().getCriteriaBuilder();
      CriteriaQuery&lt;User&gt; query = cb.createQuery(User.class);
  