sergehuber commented on a change in pull request #131: Add the ability to 
update event by item id
URL: https://github.com/apache/unomi/pull/131#discussion_r386869013
 
 

 ##########
 File path: wab/src/main/java/org/apache/unomi/web/ServletCommon.java
 ##########
 @@ -73,6 +73,9 @@ public static Changes handleEvents(List<Event> events, 
Session session, Profile
                         logger.warn("Event is not allowed : {}", 
event.getEventType());
                         continue;
                     }
+                    if (event.getItemId() != null) {
 
 Review comment:
   Hmm... I'm sorry to bring this up now but it seems like this is not a proper 
usage of events. Events are just what they are: objects that indicate something 
has happened at a certain time.
   
   What you are describing in the use case seems more like you would benefit 
more from adding a new Item type called "Review" and then using events to 
update the Review items. This could be easily done just by building your own 
plugin. You could also build your own custom API to do any queries or 
aggregations you need on your custom item type. 
   
   I know this might come as a (big?) change, but with your use case it makes 
things a little different.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to