quality@glassfish.java.net

Re: JPA2 Metamodel class . Does this feature work ?

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Tue, 16 Mar 2010 08:26:07 +0200

On 15 March 2010 07:52, Richard Kolb <rjdkolb_at_gmail.com> wrote:

>
> CriteriaQuery<String> cq = cb.createQuery(String.class);
> Metamodel m = em.getMetamodel();
> EntityType<Pet> Pet_ = m.entity(Pet.class);
>
> Root<Pet> pet = cq.from(Pet.class);
> cq.select(pet.get(Pet_.name));
>
>
I now believe this is yet another syntax error in the JPA2 section in the
tutorial


CriteriaQuery<String> cq = cb.createQuery(String.class);
Metamodel m = em.getMetamodel();
EntityType<Pet> pet_ = m.entity(Pet.class);//was Pet_



Root<Pet> pet = cq.from(Pet.class);
cq.select(pet.get(Pet_.name));


*Can anyone confirm this , so I can add it to the issue ?
*

 https://glassfish.dev.java.net/issues/show_bug.cgi?id=11676