I'm importing an Obs through the openmrs-1.9-beta.jar . The Obs is a remark, stored in value_text, and consists of "BTF but can't finish it because it's so Sticky, take long time."
When I saved the encounter, I got this error:
ERROR - JDBCExceptionReporter.logExceptions(234) |2012-03-28 14:32:56,369| Value too long for column "VALUE_TEXT VARCHAR(50)": "'BTF but can''t finish it because it''s so Sticky, take long time.' (63)"; SQL statement:
insert into obs (obs_id, uuid, obs_datetime, value_group_id, value_datetime, value_numeric, value_modifier, value_text, value_complex, comments, accession_number, date_created, voided, date_voided, void_reason, person_id, concept_id, value_coded, value_coded_name_id, value_drug, order_id, location_id, encounter_id, creator, voided_by, obs_group_id, previous_version) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [90005-135]
Looking at the Obs table in MySQL, value_text is defined as type TEXT, which in MySQL has a max length of 65535 bytes.
Is there some kind of mismatch between Hibernate and MySQL?