vyommani commented on code in PR #1327:
URL: https://github.com/apache/ranger/pull/1327#discussion_r4356981168


##########
security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java:
##########
@@ -698,6 +700,8 @@ public RangerServiceDef createServiceDef(RangerServiceDef 
serviceDef) throws Exc
             }
         }
 
+        updateServiceDefText(createdSvcDef, constraintDefs);

Review Comment:
   constraintDefs are stored only in def_text, so XXServiceDef has no field for 
them. buildDefText rebuilds the JSON from the row columns and child rows, then 
adds this list. Create and update take the list from the request before the row 
is reloaded (in update, serviceDefService.update() returns an object read from 
the old def_text). 
   
   If you prefer that shape, I can add a transient list on XXServiceDef and 
drop the argument
   createdSvcDef.setConstraintDefs(constraintDefs);
   updateServiceDefText(createdSvcDef);
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to