-
Notifications
You must be signed in to change notification settings - Fork 231
Open
Description
Hello,
In the guide "[Accessing JPA Data with REST](https://github.com/spring-guides/gs-accessing-data-rest/blob/main/complete/src/main/java/com/example/accessingdatarest/Person.java)," the Person entity uses an ID of type long.
To align this guide with JPA best practices and other Spring examples (where Long is used for IDs), I suggest changing long to Long. This prevents issues related to the default value of long (0, which may be interpreted as a valid ID) and ensures better consistency across examples.
Proposed Fix:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id; // Change from long to LongThank you for considering this update.
Metadata
Metadata
Assignees
Labels
No labels