April 2018
Intermediate to advanced
382 pages
10h 11m
English
@Entitypublic class User implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; private String email; protected User() { } public User(Long id, String name, String email) { this.id = id; this.name = name; this.email = email; } //DO NOT FORGET TO IMPLEMENT THE GETTERS AND SETTERS}
<persistence-unit name="ch02-jpa-pu" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>userDb</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-classes> ...
Read now
Unlock full access