On 12/22/2011 4:00 PM, Markus Ewald wrote:
Not only is it lazily loading the diagnosis (despite the join!), it happily continues issuing DELETE FROM commands to the database. I also tried liberally sprinkling 'cascade="none"' in all affecting mappings to see if I could NHibernate to change its behavior in any way, but no luck.

This is pretty scary behavior, I must say.


I now added a

    public virtual ICollection<Client> Clients { get; set; }

property to my Diagnosis class and removed the 'access="noop"' from my mapping. Now NHibernate is no longer arbitrarily deleting things in my ClientDiagnoses table.

I might try to create a reproduction project later, but for now I'll just stay very, very far away from 'access="noop"' as I either completely misunderstand it or it's horribly broken to the point of destroying data.

Maybe I can get rid of the HQL, too. I find it easier to write than the Criteria API, but it seems to arbitrarily ignore my eager loading requests, resulting in dozens of queries when one would have sufficed without a single duplicate column in the result set *sob*.

-Markus-

--
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