Hey guys,
Thanks for the help.
I added a transaction, and I am now getting a classCastException on GregorianCalendar even though I am not trying to change the date... here is the new code.
Code:
public void updateDailyStory(int id, String title, String articleText, String link, String linkText) throws Exception {
AffiliateDailyNews story = new AffiliateDailyNews();
Session s = null;
s = factory.openSession();
Transaction t = s.beginTransaction();
Query q = s.createQuery("from AffiliateDailyNews adn where adn.id = :id");
q.setInteger("id", id);
story = (AffiliateDailyNews) q.uniqueResult();
story.setTitle(title);
story.setArticle(articleText);
story.setArticleLink(link);
story.setLinkText(linkText);
s.update(story);
t.commit();
} // updateDailyStory
and the error...
Code:
java.lang.ClassCastException: java.util.GregorianCalendar
I am thinking that because I have a datetime object in my database, when I try to do this update, it is attempting to change that datetime... which I do not want.
Any help is a great help... thanks again.