SAP / olingo-jpa-processor-v4

The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Apache License 2.0
123 stars 76 forks source link

ManyToOne navigational property NullPointerException #148

Open DenJur opened 2 years ago

DenJur commented 2 years ago

Using EclipseLink 2.7.10 I'm having an issue with ManyToOne navigational property (it is using part of the composite key). Navigation property annotations: @ManyToOne(fetch = FetchType.LAZY, optional = false) @PrimaryKeyJoinColumn(name = "id", referencedColumnName = "other_id") I have also tried usual @JoinColumn both with @EmbededId and with @ClassId. On the other end property is annotated as: @OneToMany(mappedBy = "comment", fetch = FetchType.LAZY)

Error happens during first metadata generation and it's a NullPointerException in IntermediateNavigationProperty at line 244. I can confirm that cardinalityMtO at that point ends up being null.

richardatsap commented 1 year ago

@DenJur: Do you happen to use Eclipselink static weaving? This leads to the same error for me.

@wog48: Tolerating static weaving would be crucial for our project.