I don't know if lazy loading is possible with components, but i think it should work if
the Enclosure is an entity with one to one relation to Candidate.

Am schrieb Ah <[email protected]>:
Hi,



No idea ? Is there any working sample somewhere ?

If it does not work there is no way to store blob in the DB without

additional table (!)



Thanks,











On Dec 1, 11:36 pm, Ah [email protected]> wrote:

> Hi,

>

> I try to use lazy=true on a component (which encapsulate a blob) to

> avoid unecessary data transfer between the database and the

> application.

>

> Mapping :

>

>

>

>
> lazy="true">

>

>

>

>

>

> The query :

> IList candidates = session.CreateQuery("select c from

> Candidate").List();

> or

> IList candidates = session.CreateQuery("from

> Candidate").List();

>

> The SQL generated include RESUME and RESUME_FILE_TYPE columns.

> I also tried to add lazy=true on each property (Document and Suffix) :

> same problem.

>

> And it does not work either on basic property.

>

> I use Nhibernate 3.2, sessionManagement (GetCurrentSession()) with

> spring but I doubt it has anything to do with Spring since it's just

> about how hql is transformed in SQL.

>

> Did I miss something in the hibernate sessionFactory configuration ?

>

> I use the following configuration :

>

> dialect = NHibernate.Dialect.MsSql2008Dialect

> connection.provider" ="NHibernate.Connection.DriverConnectionProvider

> connection.driver_class = NHibernate.Driver.SqlClientDriver

> cache.provider_class = NHibernate.Caches.SysCache2.SysCacheProvider,

> Hibernate.Caches.SysCache2

> cache.use_query_cache = false

> hibernate.cache.use_second_level_cache = true

>

> Thanks,



--

You received this message because you are subscribed to the Google Groups "nhusers" group.

To post to this group, send email to [email protected].

To unsubscribe from this group, send email to [email protected].

For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.




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

Reply via email to