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: IQuery, ResultTransformer and Second Level Cache Problem
PostPosted: Fri Nov 28, 2008 1:29 pm 
Newbie

Joined: Fri Nov 28, 2008 9:45 am
Posts: 1
Hi,

I'm with a problem with IQuery and second level cache when I execute the following code:

string sql = @"select itemProposta
from ItemProposta itemProposta,
ItemEdital itemEdital,
LoteEdital loteEdital
where itemProposta.proposta.codigo = :codigoProposta
and itemEdital = itemProposta.itemEdital
and loteEdital = itemEdital.loteEdital
and loteEdital.codigo = :codigoLoteEdital";

IQuery query = this.Session.CreateQuery(sql);

query.SetCacheable(true);

query.SetInt32("codigoProposta", codigoProposta);
query.SetInt32("codigoLoteEdital", codigoLoteEdital);

query.SetResultTransformer(new NHibernate.Transform.DistinctRootEntityResultTransformer());

return query.List<IItemProposta>();

When the List method is executed it throws the following error: Unknown entity class: System.Object[], but if my IQuery object is not Cacheable or if I remove the ResultTransformer it works fine.

Can someone help me?

Thanks,

Murilo


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.