-->
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: Sort By difference of two columns
PostPosted: Wed May 18, 2011 4:13 pm 
Newbie

Joined: Thu Mar 25, 2010 11:58 am
Posts: 4
Hi All,

I have two entity beans Demand1...*Offer.

Code:

class  Demand {
private Double cost;
.
.
.
.
}

class  Offer{

private Demand  demand;
private Double price;
.
.
.
.
}


I am displaying demand and offer in datatable in my page. I also display cost-price as columns in datatable. I want to know how can sort based on cost-price. I am using Jboss Seam, so uses EntityQuery(OfferList) object to supply resultSet to datatable in my page. I tried demand.cost-offer.demand.price but it is not working. Can I use a Transient property in demand to store cost-price and sort based on the Transient property? I don’t know why demand.cost-offer.demand.price is not working in hibernate it works in normal sql.

Please advice....
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.