Senior |
|
Joined: Thu May 17, 2007 2:31 am Posts: 194 Location: Sri Lanka
|
Hi
You don't want to add getter/setters for max column. only for
id Integer
product_name Varchar(50)
category_id Integer
stock Integer
rate decimal
you can get it several wats.
List list=session.createSQLQuery("select * from TableName where rate=(select max(rate) from TableName)").addEntity(ClassName.class).list();
Amila
(Don't forget to rate if helps)
Last edited by amila733 on Mon Sep 17, 2007 1:27 am, edited 2 times in total.
|
|