Closed taj499 closed 11 months ago
As per my analysis, JPAEntityResultConverter should handle navigation properties along with entity properties to make it work. Entity class should have navigation link to support $expand.
As of now $expand is not supported together with functions, so at least a status code 501 is missing. Introducing this is laborious, as the current mechanism using sub-selects to restrict the rows of dependent table (in your example B) to the once needed. In case the JPA Processor would do the expand it would need to provide also an $expand that selects the dependent rows via the key. Alternatively this could be handled within the function itself and then, as you mentioned, the JPAEntityResultConverter needs to be able convert a deep result.
As a first step a 501 will be returned. In a later step an option will be created handle $expand at a function
Are there any plans to implement this functionality soon?
As of now there was no plan to implement this. Nevertheless, as different types of functions are supported yet, which may offer different ways to implement an expand. Therefor I like to know if you implement the function on the database or in java.
Due to clean-up action. All issues created before 2022 get closed.
I created Odata function which returns collection of entity A (let say). Entity A has collection of children entity B. I am able to generate metadata document. Odata function call is working. But, ../function()?$expand=B is not working properly. It does not given me error. It just does not expand B.
I think, it should support $expand when function returns collection of enitity.