ctudose / java-persistence-spring-data-hibernate

54 stars 43 forks source link

Typo in MetamodelTest #1

Open jcaberio opened 1 year ago

jcaberio commented 1 year ago

Typo in com.manning.javapersistence.ch03.metamodel.MetamodelTest line 125

Path<String> namePath = fromItem.get(Item_.name);

Should be

Path<String> namePath = fromItem.get("name");
jmizv commented 1 year ago

I think it is okay like it is. See the book, some listings after listing 3.10:

The special class here is Item_; note the underscore. This class is a metadata class, and it lists all the attributes of the Item entity class: [..] This class will be automatically generated. The Hibernate JPA 2 Metamodel Generator (a subproject of the Hibernate suite) takes care of this. [..]