-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with updating data with HibernateTamplate
PostPosted: Thu Dec 27, 2007 6:09 pm 
Newbie

Joined: Thu Dec 27, 2007 5:14 pm
Posts: 2
I have problem with updating data...

My goal: I need to generate statistics of offer's display count. When offer is displaying I want to update offer's stat from from current date, of current type.

When I invoke getHibernateTemplate().saveOrUpdateMethod() after updating object property, nothink happens - value in database is not changed - I don't get any exceptions.

My Hibernate version: 3.2.2

Stats are saved in OfferStat table. It's hbm.xml is:

<class
name="com.eastcom.rnw.entities.OfferStat"
table="offer_stat"
schema="public"
>
<cache
usage="read-write"
/>

<id
name="offerStatId"
type="long"
column="offer_stat_id"
length="4"
>
<generator class="identity" />
</id>
<property
name="statDate"
type="date"
column="stat_date"
length="4"
/>
<property
name="visitCount"
type="integer"
column="visit_count"
length="4"
/>


OfferStatDAO:
public void persistOfferStat(OfferStat offerStat)
{
getHibernateTemplate().saveOrUpdate(offerStat);
}


In serivce first I'm getting offer stat form particulary date, of particulary type, than I change visitCOunt of this offer and invoke persistOfferStat(OfferStat offerStat) from DAO.

Any clues?

Thanks for any help


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.