You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "srikanth raghupatruni (JIRA)" <ji...@apache.org> on 2015/06/18 16:02:00 UTC

[jira] [Created] (OLINGO-706) Nullable is set to true for all the relations JPA

srikanth raghupatruni created OLINGO-706:
--------------------------------------------

             Summary: Nullable is set to true for all the relations JPA
                 Key: OLINGO-706
                 URL: https://issues.apache.org/jira/browse/OLINGO-706
             Project: Olingo
          Issue Type: Bug
          Components: odata2-jpa
    Affects Versions: V2 2.0.3
            Reporter: srikanth raghupatruni
            Priority: Blocker


For all the relations defined as ManyToOne, the field type is getting set as not nullable. As per my data model , the foriegnkey field can be null. 

I tried setting the below annotations but the metadata is getting generated as nullable = false

@ManyToOne(optional = true)
@JoinColumn(name = "page",columnDefinition="integer",nullable=true)
private Page parentPage

here page is my database column which can be null and have a relation defined with Master table Page on Column Id.

Because of this I am unable to read, write the data by setting the page field value as null

How can I make the nullable = true



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