We are introducing a new attribute in one of our custom models, and we are facing problems with hibernate mappings. We are using Hibernate Annotations instead of .hbm.xml files.
The error is related to the field
value defined in
BaseAttribute.java. We keep getting below error:
org.hibernate.MappingException: property mapping has wrong number of columns: org.openmrs.module.icrc.assignedAction.model.AssignedActionAttribute.value type: object
This field is defined as below:
private transient Object value;
This gets ignored in
hbm.xml files when we don’t add a mapping for this field. Refernce: VisitAttribute.hbm,xml
But we are not able to do the same using
JPA Annotations. We have tried below things:
- Create a getter for value and mark the getter as
- Tried attribute override. Reference Stackoverflow answer.
Any idea what might be causing this problem. It will be better if we can find out an Attribute which is defined using