Just Hibernate

Errata for Just Hibernate

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
PDF
Page 73
3rd paragraph

By reading this paragraph, Well, Hibernate uses Javaís reflection to find out the type of the property. Although this option of omitting the types works out fine, the preferred and recommended option is to set the types on the properties implicitly. Setting property column="COLOR" name="color" type="string" explicitly will easily give Hibernate the propertyís type. It seems the right phrase would be "the preferred and recommended option is to set the types on the properties explicitly".

Note from the Author or Editor:
Setting property column="COLOR" name="color" type="string" explicitly will easily give Hibernate the propertyís type. should be read as: The preferred and recommended option is to set the types on the properties explicitly. For example, for a color property, set the type explicitly as : column="COLOR" name="color" type="string"

Josť Fernando Tepedino  Jun 30, 2014 
PDF
Page 81
4th paragraph

Note the discriminator column on the table. Itís simply a column to store the two values, EXECUTIVE or EMPLOYEE, defined in the mapping cofiguration. should be "... defined in the mapping configuration."

Note from the Author or Editor:
Note the discriminator column on the table. Itís simply a column to store the two values, EXECUTIVE or EMPLOYEE, defined in the mapping configuration

Josť Fernando Tepedino  Jun 30, 2014 
Printed, PDF, ePub
Page 81
last code block

Tag without typos: @DiscriminatorColumn(name="DISCRIMINATOR", discriminatorType=DiscriminatorType.STRING) a little further, the ID generation strategy is missing: @ID @Column(name="EMPLOYEE_ID") @GeneratedValue(strategy=GenerationType.AUTO) private int id = 0;

Note from the Author or Editor:
The discriminatorType is mis-spelt, should be read as: @DiscriminatorColumn(name="DISCRIMINATOR", discriminatorType=DiscriminatorType.STRING) Also, the the ID strategy should be annotated on the Employee class definition: @ID @Column(name="EMPLOYEE_ID") @GeneratedValue(strategy=GenerationType.AUTO) private int id = 0;

Josť Fernando Tepedino  Jun 30, 2014 
Printed, PDF, ePub
Page 108
4th paragraph

[...] peristence.xml (sic) in the META-INF folder [...] should be [...] persistence.xml in the META-INF folder [...]

Note from the Author or Editor:
persistence.xml in the META-INF folder

Anonymous  Jul 06, 2014 
Printed, PDF, ePub
Page 109
1st paragraph, 2nd code block

The second comment // Persistence unit related to trade entities should be // Persistence unit related to report entities

Note from the Author or Editor:
// Persistence unit related to report entities

Anonymous  Jul 06, 2014 
Printed, PDF, ePub
Page 110
Section Saving and Querying Entities, 1st paragraph

[...] we use EntityManagerís persistEntity method [...] should be [...] we use EntityManagerís persist method [...] to match the code show just below it, and to conform to EntityManager class API.

Note from the Author or Editor:
we use EntityManagerís persist method

Anonymous  Jul 06, 2014