cedric
09/18/2018, 3:33 PMPatrick Cummins
09/18/2018, 3:33 PMdef savePerson() {
...
PersonEnt person = personService.savePerson(personJSON)
forward( action: "findPerson", params:[ personId: person.id ] )
}
As part of 'personService.savePerson' logic, a 'StatusEnt' is saved. This 'StatusEnt' has an 'owner id', which references the id of the person once it's available (no foreign key)
The problem is: in the 'findPerson' logic, after the forward has taken place, the StatusEnt is sometimes not there yet (maybe 1 in 4 times). It always gets saved to the DB, every time, but not quick enough.
In short: How do I guarantee that every entity before the forward is fully flushed to the db before the 'findPatient' logic begins? (Grails 3.3.8)
Thanksdave08
09/20/2018, 2:24 AM