elmarakby / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

$expand broke in version 0.7 with JPAProducer #219

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Case 1: Use single level $expand to any relationship
Case 2: Use $expand consisting of multiple levels.

What is the expected output? What do you see instead?
Instead of returning results containing the expanded entities, the service 
returns instead:
Case 1: Uninitialized entities (example, when relationship is 1->1 or *->1) or 
no results.
Case 2: Error.

What version of the product are you using? On what operating system?
odata4j 0.7 run on tomcat on windows 7 and linux

I include my own fix of the issue. My changes are marked with comments 
containing "Liossis:".

Original issue reported on code.google.com by emmanuel...@gmail.com on 21 Sep 2012 at 9:34

Attachments:

GoogleCodeExporter commented 9 years ago
The fix only works for URLs not specifying entity key such as 

http://myhost.com/myService.svc/Registration(1234)&expand=student

It works only for general searches:

http://myhost.com/myService.svc/Registration&expand=student

I have developed a full solution along with other fixes for version 0.7 (enums, 
embedded types etc), but i will do it the proper way as soon as i have some 
time, ie cloning the source, fixing and and issuing a pull request.

Original comment by emmanuel...@gmail.com on 13 Mar 2014 at 5:36

GoogleCodeExporter commented 9 years ago
The time for a proper pull request has come:

https://github.com/odata4j/odata4j/pull/3

Original comment by emmanuel...@gmail.com on 22 Aug 2014 at 2:39