quality@glassfish.java.net

Re: JPA2 Metamodel class . Does this feature work ?

From: Judy Tang <Judy.J.Tang_at_Sun.COM>
Date: Tue, 16 Mar 2010 08:48:00 -0700

Richard Kolb wrote:
>
>
> On 15 March 2010 07:52, Richard Kolb <rjdkolb_at_gmail.com
> <mailto: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
Thanks Richard. I think it is a good idea. Please add this issue in.
Doc team will process this bug.

Judy