pagination example
This commit is contained in:
@@ -2,4 +2,5 @@ spring.main.allow-bean-definition-overriding: true
|
||||
spring.jpa.hibernate.ddl-auto: create-drop
|
||||
spring.liquibase.enabled: false
|
||||
spring.flyway.enabled: false
|
||||
io.reflectoring.scheduling.enabled: false
|
||||
io.reflectoring.scheduling.enabled: false
|
||||
logging.level.org.hibernate.SQL: DEBUG
|
||||
@@ -3,6 +3,7 @@ package io.reflectoring.customer.data;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Version;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
@@ -13,9 +14,12 @@ import lombok.*;
|
||||
@AllArgsConstructor
|
||||
public class Customer {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
@Version
|
||||
private Long version;
|
||||
|
||||
private String name;
|
||||
}
|
||||
|
||||
@@ -21,4 +21,11 @@ class CustomerModuleDataLayerTests {
|
||||
assertThat(bookingRepository).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void versionTest(){
|
||||
Customer hans = new Customer();
|
||||
hans.setName("Hans");
|
||||
customerRepository.save(hans);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user