I need to send a request to other microService once the object got created in the database. I only send the object id so other microService needs to call the db again for the info with bunch of other stuff.

But, when the other microService try to lookup for the record using the received id it cannot find the saved record in the database. 

I tried debug seems like record does not persist even though @postPersist got called.
It will be saved after @PostPersist got executed.

Has anyone could give a workaround for this. I really need to query the database again as this is a custom requirement. I use mysql and spring boot

```
public class EmployeeListener {

    @PostPersist
    public void sendData(Employee employee){
        Long id = employee.getEmployeeId();
        RestTemplate restTemplate = new RestTemplate();
        restTemplate.exchange("http://localhost:8081/service/employee"+id, HttpMethod.POST, null, String.class);

    }

}

@Entity
@EntityListeners(EmployeeListener.class)
public class Employee {
       //
}

```