exxcellent / 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
6 stars 3 forks source link

Hibernate: Olingo does not only exposed specified entities but all of them #5

Closed FWidm closed 5 years ago

FWidm commented 5 years ago

The mentioned behaviour leads to unrelated entities being accessable via OData, whose mapping might not be suitable for this. Which will lead to the behaviour that SEVERE messages describing those mapping issues are thrown: 09:08:27,003 SEVERE [noRequestClientId, YTMT4RtaeGw68cv3L4eIKmaj1ef2zSifzPF9kjSl] [org.apache.olingo.jpa.metadata.core.edm.mapper.impl.IntermediateNavigationProperty] (default task-36) Navigation property (de.akad.onlinecampus.domain.events.Event#portfolioBrick) without columns to join found, navigation to target entity is not possible!

Expected Behaviour: Only entities specified in the Persistence.xml should be exposed by the adapter.

rzozmann commented 5 years ago

This is a problem of hibernate not working properly with multiple persistence unit declarations in the same persistence.xml. The session seems to be right, but the metamodel contains all entities from all persistence units... what a shame!