-->
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: summarize values
PostPosted: Tue Aug 31, 2010 3:23 am 
Newbie

Joined: Mon Dec 25, 2006 4:59 am
Posts: 15
Hi guys

I have a table where i store counters of specific entity per each day (which acts as partition), with compound id of entity id and creation date.
When an entity is loaded it's matching counters should be loaded to, but i don't want to have a list of counters but rather one number with summarized counters value.

Is there a way to calculate this values with function or an <sql-query> ?
Code:
<class name="Entity" table="ENTITY">
<!-- should hold one counter object with summarized  values-->
</class>

<class name="Counter" table="COUNTER">

<composite-id name="id" class="compositeId" >
   <key-property name="id" column="ID" type="string"/>
   <key-property name="creationDate" column="CREATION_DATE" type="timestamp"/>
</composite-id>

<property name="infoCounter" column="INFO_CNTR"/>
<property name="errorCounter" column="INFO_CNTR"/>
...
</class>



thanks


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.