Is this possible?
I have a log table with a text column, the content of the text often exceeds 200 characters. Many of my webpages list and filter on the logs without needing the text column.
I know I can set the text field to "lazy" in my hbm.xml, but sometimes I do need to get the text field in the presentation layer, where the transaction is close.
I also understand I can move the text field to a separate table and do a one-to-one mapping, which allows me to set the fetch mode for the child object programmatically. But this seems to be a lot of work and I already have a lot of production log data.
Basically, I am looking for something like crit.setFetchMode("log.text", FetchMode.SELECT);
Is this possible?
Thanks.
|