Susan Harkins (325) [Avatar] Offline
#1
Please share errors in the published version of Java Persistence with Hibernate, Second Edition here. We'll compile and publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
251631 (2) [Avatar] Offline
#2
Small typo.

Page 24, section 2.2.3, the outlined text "PATH: /examples/src/est/java/org/jpwh/helloworld/HelloWorldJPA.java"
Should be "PATH: /examples/src/test/java/org/jpwh/helloworld/HelloWorldJPA.java"
380366 (1) [Avatar] Offline
#3
Page 21
[ 412 KB ]
Page 22
[ 203 KB ]
Page 21's XML is annotated with points; point #7 appears as a capital H (as opposed to the expected 7, white foreground Ina black circle) on page 22.

This, in the PDF version.
Gilberto Toscano (1) [Avatar] Offline
#4
Page 22
In Page 22 where the HelloWorld class code is shown, the explanatory text indicates "The class also has a (default) constructor with no parameters"; however there is no constructor in the class.
333150 (4) [Avatar] Offline
#5
Page 22
Gilberto Toscano wrote:In Page 22 where the HelloWorld class code is shown, the explanatory text indicates "The class also has a (default) constructor with no parameters"; however there is no constructor in the class.


*****This is not an error*****

You do not need to specify a default constructor. It is provided by the compiler by "default".
In case, you write a parametrised constructor, then you "must" provide a default constructor.
509189 (1) [Avatar] Offline
#6
On Page 160 on topic 7.2.5 Components as Map keys. On the first line after the figure, it is published as

In fact, you can’t apply @MapKeyColumn and @AttributeOverrides ; they have no effect
when the map’s key is an @Embeddable class.

I agreed we can't apply @MapKeyColumn to @Embeddable class, but we can apply @AttributeOverrides to @Embeddable class, prefixing either the "key" or "value" with the field property in the @AttributeOverride annotation.

The same is also mentioned in the docs of @AttributeOverride annotation.