QueryOver, TransformUsing and Cacheable?

131 views
Skip to first unread message

Hainesy

unread,
Mar 8, 2011, 5:34:15 AM3/8/11
to nhusers
Hi

I have a problem using Cacheable()
after .TransformUsing(Transformers.AliasToBean<T>())

I get the error:

Unable to cast object of type '...' to type 'System.Object[]'.

Seems that cacheable doesn't work with the bean transformation?

Anyone else had any problems with this?

Richard Brown (gmail)

unread,
Mar 12, 2011, 6:01:22 PM3/12/11
to nhusers
Hi,

I just tried it and it seems to happen with ICriteria too.

If you could raise a JIRA for it that would be great.

Cheers,
Richard

Hi

I get the error:

--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to
nhusers+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.

Hainesy

unread,
Mar 14, 2011, 5:23:47 AM3/14/11
to nhusers
Richard

I wouldn't mind doing that, but I'm not entirely sure how to
effectively write a good test for whether NHibernate has hit the cache
or the DB.

Any ideas?

Chris



On Mar 12, 11:01 pm, "Richard Brown \(gmail\)"

Richard Brown (gmail)

unread,
Mar 14, 2011, 9:59:51 AM3/14/11
to nhusers
Hi Chris,

Don't worry - if you reference this thread in the JIRA, that will be enough
for it not to get missed.

And, when I tried it, it doesn't actually matter if you use the cache or not
... the query blows up anyway (and it shouldn't).

Hainesy

unread,
Mar 15, 2011, 5:11:26 AM3/15/11
to nhusers
http://216.121.112.228/browse/NH-2576


On Mar 14, 1:59 pm, "Richard Brown \(gmail\)"
Reply all
Reply to author
Forward
0 new messages