Missing features in JPA

During the past JPA course at the university of applied sciences in Bern I discovered two missing features in JPA:

1. static inner classes in constructor expressions

Example:

// Constructor Expression
String queryString =
“SELECT NEW Outer.Inner(e.name) FROM Employee e”;

Query query = em.createQuery(queryString);
List outer = query.getResultList();
for (Outer.Inner inner : outer) {

}

Where Outer.Inner is a static inner class in Outer:

public class Outer {
public static class Inner {
private String name;
public Inner(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
}

In my opinion this should work. Because I can instanceiate Inner like this:
Outer.Inner in = new
Outer.Inner(“Simon”);

2. Enumerations in JPQL

For example, this works fine:

String queryString =
“SELECT a FROM Address a where a.addressType = :type”;

Query query = em.createQuery(queryString);
query.setParameter(“type”, AddressType.OFFICE);

But this does not:

String queryString = “SELECT a FROM Address a where a.addressType = AddressType.OFFICE”;
Query query = em.createQuery(queryString);

Surprising this works in Hibernate but not with TopLink:

String queryString = “SELECT a FROM Address a where a.addressType = ‘OFFICE'”;
Query query = em.createQuery(queryString);

I hope this two features will be contained in the next JPA relase!