What is the difference between ORCLPDB1 and ORCLCDB?

I am trying to test the connection to a db jdbc:oracle:thin:@//xxx:1521/ORCLPDB1 – it works to connect to the cloud db via port forwarding jdbc:oracle:thin:@//xxx:1521/ORCLCDB – it does not work to connect to the cloud db via port forwarding However I read that the ORCLCDB (SID) shoud be specified in the flyway config and spring. datasource… Read More What is the difference between ORCLPDB1 and ORCLCDB?

What is the use of generating getters and setters in a class annotated with @Entity (Hibernate)?

What is the use of generating getters and setters in a class annotated with @Entity (Hibernate)? When do they get invoked? @Entity @Table(name="student") public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="id") private int id; private String firstName; private String lastName; public Student() { } public Student(String firstName, String lastName) { this.firstName = firstName; this.lastName… Read More What is the use of generating getters and setters in a class annotated with @Entity (Hibernate)?

OneToMany lazy initialization when needing collection data

what’s a workaround if I have a relation OneToMany and would like to access the collection that is lazy loaded? Currently I get LazyInitializationException having this: Club entity: @Entity public class Club { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; @OneToMany(mappedBy = "club", cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) @JsonBackReference private List<Player>… Read More OneToMany lazy initialization when needing collection data

SQL JPA Hibernate refer user to parent user

I want to create an API with users where I can make referals to other user and store the users that refearal me. @Entity @Table(name="requirement") @Data @NoArgsConstructor public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", nullable = false) private Long id; @Column(name = "name") private String name; private User parentUser; } CREATE… Read More SQL JPA Hibernate refer user to parent user

java.lang.StackOverflowError: null at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields

I’m trying to create an app that allows to track the couriers, using Sptring boot. But here I got struggled with some problem. When I try to call get_couriers function, it throws me this exception: java.lang.StackOverflowError: null at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774) ~[jackson-databind-2.13.3.jar:2.13.3] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178) ~[jackson-databind-2.13.3.jar:2.13.3] at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serializeContents(CollectionSerializer.java:145) ~[jackson-databind-2.13.3.jar:2.13.3] at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize(CollectionSerializer.java:107) ~[jackson-databind-2.13.3.jar:2.13.3] at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize(CollectionSerializer.java:25) ~[jackson-databind-2.13.3.jar:2.13.3] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:728) ~[jackson-databind-2.13.3.jar:2.13.3]… Read More java.lang.StackOverflowError: null at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields