adutra commented on code in PR #1401:
URL: https://github.com/apache/polaris/pull/1401#discussion_r2051472902


##########
extension/persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkStore.java:
##########
@@ -84,7 +84,7 @@ void writeToEntities(EntityManager session, PolarisBaseEntity 
entity) {
     diagnosticServices.check(session != null, "session_is_null");
     checkInitialized();
 
-    ModelEntity model = lookupEntity(session, entity.getCatalogId(), 
entity.getId());
+    ModelEntity model = lookupEntity(session, entity.getCatalogId(), 
entity.getId(), -1);

Review Comment:
   > Why not use entity.getTypeCode()?
   
   Because I'm not sure it makes sense on write paths. Here we are looking up 
an existing entity to decide whether the write is an update or an insert. So 
the type of the existing entity actually doesn't matter much, since it will end 
up overwritten by the new one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to