Hi guys,
Here´s my problem: I have a one-to-many association being erroneously
fetched - I really don´t need it and its causing us serious
performance issues.
I´m using a named query containing native SQL (SqlServer). This named
query returns a mapped entity.
The snippet below shows the named query:
select
{eg}.CD_ESTRUTURA as {eg.Id},
{eg}.NM_ESTRUTURA as {eg.Nome},
{eg}.CD_OBRA as {eg.Obra},
{eg}.CD_ESTRUTURA_PAI as {eg.Parent}
from Hierarquia {eg}
where {eg}.CD_OBRA is not null
Note the {eg.Obra} property. Its a one-to-many association with
another entity called "Obra".
The problem is that after fetching all the {egs} nhibernate starts
fetching all "Obras" one by one...
Does anyone know how to make it NOT fetch this association?
Seems like I have to include all entity´s properties in the returned
statement. Is that true?
Thanks in advance
Fábio
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---