olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject olingo-odata2 git commit: [OLINGO-1020] Fix for ZERO_TO_ONE
Date Tue, 29 Nov 2016 05:44:33 GMT
Repository: olingo-odata2
Updated Branches:
  refs/heads/master b3cb2ce77 -> dfe17829f


[OLINGO-1020] Fix for ZERO_TO_ONE


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/dfe17829
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/dfe17829
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/dfe17829

Branch: refs/heads/master
Commit: dfe17829fa653650b83c8d1f4fd112d9e5e4b19b
Parents: b3cb2ce
Author: mibo <mibo@apache.org>
Authored: Tue Nov 29 06:42:16 2016 +0100
Committer: mibo <mibo@apache.org>
Committed: Tue Nov 29 06:42:16 2016 +0100

----------------------------------------------------------------------
 .../odata2/jpa/processor/core/access/data/JPAEntityParser.java   | 1 +
 .../jpa/processor/ref/listeners/SalesOrderTombstoneListener.java | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dfe17829/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParser.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParser.java
b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParser.java
index 47361a5..fb0373b 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParser.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParser.java
@@ -535,6 +535,7 @@ public final class JPAEntityParser {
 	          params = new Class<?>[] { navPropMapping.getJPAType() };
 	          break;
 	        case ONE:
+          case ZERO_TO_ONE:
 	          params = new Class<?>[] { ((JPAEdmMapping) end.getEntityType().getMapping()).getJPAType()
};
 	        default:
 	          break;

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dfe17829/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
index 55f2013..1b0bb68 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
@@ -37,7 +37,9 @@ public class SalesOrderTombstoneListener extends ODataJPATombstoneEntityListener
   public void handleDelta(final Object entity) {
     SalesOrderHeader so = (SalesOrderHeader) entity;
 
-    if (so.getCreationDate().getTime().getTime() < ODataJPATombstoneContext.getDeltaTokenUTCTimeStamp())
{
+    if(so == null || so.getCreationDate() == null) {
+      return;
+    } else if (so.getCreationDate().getTime().getTime() < ODataJPATombstoneContext.getDeltaTokenUTCTimeStamp())
{
       return;
     } else {
       addToDelta(entity, ENTITY_NAME);


Mime
View raw message