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/06/30 10:12:05 UTC

[jira] [Commented] (OLINGO-711) Using an Entity in an Embeddable Object

    [ https://issues.apache.org/jira/browse/OLINGO-711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14607914#comment-14607914 ] 

Chandan V.A commented on OLINGO-711:
------------------------------------

Hello Gregory,
Having JPA relationships inside embeddable types are not supported. Because Embeddable types in JPA entity definitions are transformed into Complex Types in OData model. In your case JPA processor cannot map such definitions to OData metadata definition.

You could get more detailed errors by executing the HTTP request with odata-debug=json query parameter.

Thanks
Kind regards
Chandan

> Using an Entity in an Embeddable Object
> ---------------------------------------
>
>                 Key: OLINGO-711
>                 URL: https://issues.apache.org/jira/browse/OLINGO-711
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.4
>            Reporter: Gregory Tutt
>            Assignee: Chandan V.A
>            Priority: Critical
>
> When calling the $metadata service, I receive an error which is caused by an exception raised when generating the model.
> I have an Entity that contains an Embeddable object which contains an other Entity. When calling the $metadata service, I receive an error message.
> @Embeddable
> public class ControlRecord implements Serializable {
> 	@JoinColumn(name="createdBy")
> 	@ManyToOne
> 	private UserDefinition createdBy;
>         ....
> }
> @Entity
> public class UserDefinition implements Serializable {
> 	@Id
> 	@GeneratedValue
> 	private Long id;
>         ...
> }
> @Entity
> public class Component implements Serializable {
> 	@Id
> 	@GeneratedValue
> 	private Long id;
> 	@Embedded
> 	private ControlRecord ctrlRecord;
> )
> The error message is empty.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)