First, thanks for the attention and time,
Quote:
I'm not sure whether I understand the point of your question. Is it about using unmapped data, or about read-only transactions?
It is about both :)
I would like to be able to get unmapped data. But if I cannot do it (or don't know how to) I would like to make the thing mapped, but somehow mark it readonly, as to improve performance.
Thanks for pointing out those pages. Yes, I have seen them.
This is query from Hib In Action:
Quote:
select new ItemRow( item.id, item.description, bid.amount )
from Item item join item.bids bid
where bid.amount > 100
For that to work I need Item mapped. As I have 7 joined tables in my query I would not otherwise map, I think this is not the best solution for my problem.
Plus I
think you can only do joins on how the table's are mapped which could be a limitation, but probobly will not.
For now I created a view, mapped the view to a BusinessSummaryObject class, using mutable="false" and session.setFlushMode(FlushMode.NEVER); This seems ugly.
Regards,
MB