You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Chandan V.A (JIRA)" <ji...@apache.org> on 2015/11/27 04:27:11 UTC
[jira] [Closed] (OLINGO-770) JPA OneToMany not able to create
entity
[ https://issues.apache.org/jira/browse/OLINGO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chandan V.A closed OLINGO-770.
------------------------------
Resolution: Fixed
Assuming the issue to be fixed. If not please reopen the ticket.
> 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)