cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while fetching model data through id after saving but works when wait for some time and click again on a link

Former Member
0 Kudos

Hi, I am new to hybris and facing below issue: I need to sync employee details from different system in hybris for which I am fetching all the employee data through a web service and sync with hybris database and show the list but when I click on the employee i am not able to find it in hybris and getting null pointer exception. At the same time when I run flexible query to search employee though HAC I am able to find that employee(I am using uid as a primary key to fetch data).

It also works if I wait for some time and then click on the employee link. Please help.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It should work ideally, try modelservice.create(Employee.class) to get an instance for the model before saving, set the data and then save.

Additionally, UID in Employee/Customer Type is always stored in lower case. I hope that is not causing the issue. Let us know.

I see modelservice also has refresh method. that should be it. try it and let us know.