Can't Save (Update) Person

Hello All,

Can anyone see why I can not update a person doing this:

Patient pa = patientService.getPatient(57); Integer pid = pa.getPersonId(); Person person = Context.getPersonService().getPerson(pid);

		Concept concept = Context.getConceptService().getConcept(5002);
		System.out.println("The patient pid: " + pid + " ...");
		
		person.setGender("M");
		//person.setDead(true);
		//person.setDeathDate(Calendar.getInstance().getTime());
		//person.setCauseOfDeath(concept);
		Context.getPersonService().savePerson(person);
		System.out.println(" dead patient updated...");

I am getting the error:

hibernate not-null property references a null or transient value: org.openmrs.PersonAttribute.value

Thanks.

Provile the full log at hastebin.com

1 Like

Thank you for responding @tendomart! I just figured out that the field “value” in person_attribute table was empty and it should not be empty so that I could save a person.

1 Like

@pcp have you tried to figure out the problem, can you share the log using pastebin