Hello Everybody,
i'm using Hibernate 3 in combination with a Oracle 8i db.
In my POJO i have the following mapped fields
private String uuid;
private String emailadres;
private String voornaam;
private String achternaam;
private Date geboortedatum;
private String status;
private Date request_datum;
private Date created_datum;
private Date error_datum;
private String erroromschrijving;
private Long enf_relaties_id;
private String nationaliteit;
My problem is when I edit just the field "created_datum" than this date field shows correctly for example "02-10-2008 15:15:17". But the site effect is that the content of filed "achternaam" (familyname) is corrupted.
For example before update 'abcdefghi'
after update '¿@ghi'
Strange enough is when I just update another date field for example 'error_datum' than "achternaam" is ok.
org.hibernate.Session session = HibernateUtil.getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
Query query1 = session.getNamedQuery("ounl.studieaanbod.bo.gmailAdressen.byStatus");
query1.setString("st", STATUS_REQUEST);
List<GmailAdressen> list = query1.list();
for (GmailAdressen request :list) {
......
if(error!=null) {
request.setError_datum(new Date());
request.setStatus(STATUS_ERROR);
request.setErroromschrijving(setErrorMessage(request.getErroromschrijving(),error));
}
else {
request.setCreated_datum(new Date());
request.setStatus(STATUS_ACTIVE);
}
}
}
tx.commit();
session.close();
}
I already tried with java.util.date and java.sql.date.
Any suggestions what could be wrong?
Regards,
Anton
|