Closed mbossX closed 7 months ago
@wog48 plase check this.
spring-boot version is 3.1.5 dependencies show below:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-processor</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
crash at
com.sap.olingo.jpa.processor.core.query.JPAAbstractJoinQuery.java:642 createFromClauseNavigationJoins()
this.target = (From)this.target.as(cast.getTypeClass());
cast.getTypeClass() return "tech.jiyun.odata.entity.Role" but this.target.as crash
https://github.com/mbossX/ojp-issue-236
minimal test repo
Hi @mbossX, I am also facing the issue, but for me, the below line is at 747 in the same class and method.
target = (From<?, ?>) target.as(cast.getTypeClass());
Please do let me know if you find any solution. Thanks
temporarily downgrade to version 1.1.1 and springboot 2.7.17.
Thanks, @mbossX, We are upgrading to implement Java 17 and Spring Boot 3. Thanks anyway.
i am facing this issue with spring boot 3.1.5.
Dear Team: We are also facing the same issue with Expand! We have recently migrated all our APIs from Spring 2.7 to Spring3.1.5. Our previous version has heavy dependence on OData library for all our dashboards and dynamic data explorations with expand and aggregations. Deeply appreciate if someone can address this ASAP or at least provide an ETA so that we can plan our deliverables. TIA, ATTN: (@wog48 )
I am facing similar issue with spring boot 3.
@Table(name = "workflow")
class Activity {
....
@OneToMany(mappedBy = "workflow", orphanRemoval = true, cascade = CascadeType.ALL)
private List
@Table(name = "workflow_log") class ActivityLog { .... @ManyToOne @JoinColumn(name = "workflow_id") private Activity workflow; ....
}
When execute ..../Activities?$top=2&$expand=Logs, I receive an error "The attribute [workflow_id] is not present in the managed type"
This is the same issue as described in issue#238. As explained there, this is seen as an issue of the Hibernate version comming with Spring Boot 3.x. You can try to use the JPA Processor own JPA Criteria Builder implementation odata-jpa-processor-cb by adding the corresonding dependency to you pom.
Any one able to find a solution for this issue?
It turned out that there is also a problem in the JPA Processor
Please have a look at version 2.0.2.In case you still face the problem, reopen the issue
when browser
http://localhost:8081/odata/v1/Users(1)?$expand=role
return
Could not determine recommended JdbcType for tech.jiyun.odata.entity.Role
use v2.0.0 and springboot 3.1.5but same code work fine at v1.1.1 and springboot 2.7.17