Hi Team
When user is not logged in, RegisterToken in PushNotificationAPI will cause following error.
Error in advanced query UpdateDevice in RegisterToken in PushNotificationsApi (UPDATE {Device} SET {Device}.[UserId] = @UserId, {Device}.[PushToken] = @PushToken, {Device}.[DeviceTypeId] = @DeviceTypeId, {Device}.[UpdatedOn] = @UpdatedOn WHERE {Device}.[HardwareId] = @HardwareId AND {Device}.[ApplicationCode] = @ApplicationCode): ORA-02291: integrity constraint (OSADMIN_DEV1.OSFRK_OSUSR_U2J_DEVICE_OS72191) violated - parent key not found
It seems UpdateDevice query set UserId to 0, but it should be NULL.
We had modified the query as following and it worked.
SET {Device}.[UserId] = CASE WHEN @UserId = 0 THEN NULL ELSE @UserId END,
Regards
Wei
Hey, Wei,
Thanks for the heads-up (and fix)! We'll put it on the backlog to be added in the near future.
Thanks again,
Carlos Simões