You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
"The following code snippet shows how to obtain the Pet entity’s metamodel class by calling Root.getModel:
EntityManager em = ...;
Root pet = cq.from(Pet.class);
EntityType Pet_ = pet.getModel();"
Pet_ is the CANONICAL static metamodel and does NOT implement EntityType. This is utterly wrong. You get Pet_ by statically referring to it, and it is generated by an annotation processor.
The same tutorial even has
@Static Metamodel(Pet.class)
public class Pet_
{ public static volatile SingularAttribute<Pet, Long> id; public static volatile SingularAttribute<Pet, String> name; public static volatile SingularAttribute<Pet, String> color; public static volatile SetAttribute<Pet, Owner> owners; }
so it says Pet_ does not implement EntityType (and indeed is nothing to do with it).
This should be FIXED ASAP, or you will utterly confuse people
The text was updated successfully, but these errors were encountered:
(original issue: jakartaee/persistence#121)
See this page
https://docs.oracle.com/javaee/6/tutorial/doc/gjiup.html
It says
"The following code snippet shows how to obtain the Pet entity’s metamodel class by calling Root.getModel:
EntityManager em = ...;
Root pet = cq.from(Pet.class);
EntityType Pet_ = pet.getModel();"
Pet_ is the CANONICAL static metamodel and does NOT implement EntityType. This is utterly wrong. You get Pet_ by statically referring to it, and it is generated by an annotation processor.
The same tutorial even has
@Static Metamodel(Pet.class)
public class Pet_
{ public static volatile SingularAttribute<Pet, Long> id; public static volatile SingularAttribute<Pet, String> name; public static volatile SingularAttribute<Pet, String> color; public static volatile SetAttribute<Pet, Owner> owners; }
so it says Pet_ does not implement EntityType (and indeed is nothing to do with it).
This should be FIXED ASAP, or you will utterly confuse people
The text was updated successfully, but these errors were encountered: