phdmohans / odata4j

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

JPAProducer with complex key naming issue #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.GET the following against the 
JPAProduceExample:http://localhost:8886/JPAProducerExample.svc/Order_Details?$fo
rmat=json&$filter=Order_DetailsPK/ProductID%20lt%2011

What is the expected output? What do you see instead?
expecting some Order_Details entities, got HTTP/1.1 500

Please use labels and text to provide additional information.

looks like the query generator is trying:
Exception Description: Error compiling the query [SELECT t0 FROM Order_Details 
t0 WHERE t0.Order_DetailsPK.ProductID < 11], line 1, column 41: unknown state 
or association field [Order_DetailsPK] of class 
[org.odata4j.producer.jpa.northwind.Order_Details].

If I change the primary key name to the java bean style name: orderDetailsPK, 
things work:  
http://localhost:8886/JPAProducerExample.svc/Order_Details?$format=json&$filter=
orderDetailsPK/ProductID%20lt%2011

Original issue reported on code.google.com by tony.ro...@gmail.com on 6 Jul 2011 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by john.spurlock on 2 Oct 2011 at 8:13