For NHibernate 1.0.2 I implemented several classes. I need lazy load to decrease amount of SQL queries.
Code:
[Class(Table = "DOCUMENT_DEFINITION", Lazy = true)]
public class DocumentDefinition
{ ... }
[Class(Table = "DOCUMENT")]
public class Document
{
....
[ManyToOne(Column = "DOCDEF_ID")]
public DocumentDefinition DocumentDefinition
{
get ... set ...
}
...
}
In 1.0.2 all worked OK, and loading was lazy as required. Then I switched to ver 1.2.0, and got exception
Code:
[InvalidProxyTypeException: Type 'DocumentDefinition' cannot be specified as proxy: method get_Id should be virtual]
Is it possible to use lazy load support without implementing each my class as interface first? [/url]