Tags: #<Tag:0x00007f88c95d5080>

(Shujaat Ali) #1

I try to create/save a LabTestAttribute it throws a ConversionException exception. I am writing a unit test for one of our module named as common lab test module. Before going on the issue I will let know the structure of module code.



Test Case

Hibernate File


(Nathan Ruhanga) #2

@shujaat, there is probably missing a @PropertyGetter annotated method for the property valueReference that you added. You may need to provide this method depending on your use case to silence this error.

(Shujaat Ali) #3

@ruhanga, in openmrs BaseAttribute class we have the setter and getter for valueReference property, Take a look at the BaseAttribute Abstract Class

(Daniel Kayiwa) #4

Is this the full stack trace?

(Shujaat Ali) #5

Yes @dkayiwa !

(Daniel Kayiwa) #6

Can you commit your changes to a repository from where we can check out?

(Shujaat Ali) #7

please checkout the master branch

(Daniel Kayiwa) #8

Can you add these to the resource?

(Shujaat Ali) #9

Okay, let me add this @PropertyGetter /@PropertySetter for value.

(Owais Hussain) #10

Thanks a bunch @dkayiwa, these methods as is didn’t work, but I got the point. We needed to explicitly define PropertyGetter/Setter to handle value in this case.

@shujaat please check this commit…