Hi guys,
I do not really know if it is connected with tapestry or only the
Hibernate, but maybe that is the case. So there is a embedded calendar on
the site, the one from tapestry-jquery library:
http://tapestry5-jquery.com/mixins/docscustomdatepicker

If the user chose - during registration - the 28/03/1982 date, the value
will be correctly save to the database. But if you want to change this date
and the calendar is going to be prepared, the date retrieved by the UserDao
(the birthDate field) equals to 27/03/1982.

I use the DAOs layer, which uses the Hibernate session. It is automatically
passed as an argument during the binding process (in the AppModule class):

binder.bind(UserDao.class,
UserDaoImpl.class).scope(ScopeConstants.PERTHREAD);

The UserDao is used in setupRender and onActivate methods of my page (user
is an javax Entity):

user = userDao.load(userId);
user.getBirthDate().toString()

What's funny, if I use the Hibernate in the different way

List<Object> birthDatesList = userDao.getSession().createSQLQuery("select
birthdate from user where id = " + userId).list();
java.sql.Timestamp birthDate = (java.sql.Timestamp)(birthDatesList.get(0));
log.info("setupRender (birth date): " + birthDate.toString());

the returned date is correct.

I also logged the birth dates of the other users, and the problem occurs
only in the 28/03/1982 case. Have you ever noticed anything like that?

Reply via email to