user617597
user617597

Reputation: 786

Lazy loading in hibernate, for this scenario

I have a table called MKDoc(name varchar, author varchar, attachment blob).

I want to display name and author to the user, as link. when the user clicks on the link, the attachment will gets loaded and saved to user system. I want the attachment to be lazy loaded. Is it possible?

Upvotes: 0

Views: 124

Answers (1)

Zoidberg
Zoidberg

Reputation: 10323

Yes, on the attachment property in your Hibernate mapping, put in the attribute lazy="true" and that should do it.

Upvotes: 1

Related Questions