1. With your help could get my protected collection working.
 
If I change:
protected readonly IList<BookToc> _tocs;
to:
protected virtual IList<BookToc> Tocs { get; set; }
 
Even then I call Tocs from a method on the same entity. Thanks!
 
Although it would be nice if the old style could still be supported. A fix 
for this and a pull request can be found here:
https://nhibernate.jira.com/browse/NH-3132
 
2. Unfortunately I still have a major problem that the lazy property is not 
loaded if its accessed by a method (or another property) in the same entity.
 
This seems to be a real bug. A failing test can be found here:
https://nhibernate.jira.com/browse/NH-3058
 
It really would nice if this use case could be supported because we have 
additional business logic that needs to be run when the lazy property is 
set or updated. We use methods to provide this logic and these 
methods currently only read null. If we read the lazy property from outside 
the entity it all works very well. This i what I mean with anemic entities. 
Methods can not be used to access or update the property. This forces us to 
add the internal business logic to the calling code, not a very nice 
solution.
 
Thanks again for replaying and I do appreciate all the hard work the whole 
team is putting into this excelent ORM!

/Joakim

Reply via email to