[
https://issues.apache.org/jira/browse/OLINGO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14739037#comment-14739037
]
Miguel commented on OLINGO-770:
-------------------------------
Hi Chandan
The body is a simple Map<String, Object> class; here the example
Map<String, Object> body = new HashMap<String, Object>();
body.put("OrderNo",123456789);
body.put("CreationDate",Calendar.getInstance());
body.put("CustomerName", "Miguel");
Cheers
Miguel
> JPA OneToMany not able to create entity
> ---------------------------------------
>
> Key: OLINGO-770
> URL: https://issues.apache.org/jira/browse/OLINGO-770
> Project: Olingo
> Issue Type: Bug
> Components: odata2-jpa
> Affects Versions: V2 2.0.4
> Reporter: Miguel
> Assignee: Chandan V.A
>
> I have 2 entities OrderHeader and OrderItem,, the relation between then is
> One To Many... with bi-directional
> In the OrderHeader
> @OneToMany(mappedBy="OrderHeader")
> private List<OrderItem> orderItems;
> In the OrderItem
> @ManyToOne(fetch=FetchType.LAZY)
> @JoinColumn(name="ORDER_ID", nullable=false)
> private OrderHeader orderHeader;
> When the following is called
> ODataEntry entry = template.requestBody("olingo2://create/OrderHeaders",
> body, ODataEntry.class);
> There is a exception thrown
> Could not match segment: 'OrderHeaders(4004280407L)/OrderItemDetails'.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)