[hibernate-dev] problem in select specified fields

gayan sukumal wiharagoda gayanwiharagoda at gmail.com
Mon May 7 22:38:17 EDT 2012


Hi,
can some one help me.
regards,
Gayan

On Tue, May 8, 2012 at 7:17 AM, gayan sukumal wiharagoda <
gayanwiharagoda at gmail.com> wrote:

> Hi,
> I am new to hibanate,Stuts and Tile. Now I want  to get selected
> specified columns. I have mention the code below. It is not working.
>
> List<SelelctItemList> list = new ArrayList<SelelctItemList>();
> Query query = (Query) session.createQuery("select s.item_id,s.name,s.unit_price_sel,s.unit_price_buy,su.quantity
> from service_uses as su INNER JOIN stocks as s ON     su.item_id=s.item_id
> where service_id="+ serviceId);
> list = ((org.hibernate.Query) query).list();
>
> cheers,
> Gayan
>


More information about the hibernate-dev mailing list