I am working on integrating spanner with our existing application. I'm facing an error when trying to save/persist data into DemoClass entity in spanner using JPA and hibernate 6. The error I'm facing is as under
Error: Number of joins exceeds the maximum allowed limit of 20.
Entity class
@Entity
DemoClass extends CommonClass{
...
...
//getter and setter
}
@MappedSuperClass
CommonClass implements Serializable {
@CreationTimeStamp
Timestamp CreatedTime;
@CreationTimeStamp
Timestamp updatedTime;
@OneToOne
Demo2 createdUser;
@OneToOne
Demo2 updatedUser;
//getter and setter
}
@Entity
Demo2 extends CommonClass {
...
...
//getter and setter
}
Dependencies from pom.xml
spring-boot-starter-parent: 3.3.5
spring-boot-starter-data-jpa
google-cloud-spanner-hibernate-dialect: 3.7.1
google-cloud-spanner: 6.81.2
spring-cloud-gcp-data-spanner: 5.8.0
google-cloud-spanner-jdbc : 2.24.1
hibernate-types-60: 2.21.1