---
title: "Since NHibernate 1.2.0, objects are lazy by default"
author: "maplye"
date: "2007-01-15T14:56:00Z"
tags: []
slug: "since-nhibernate-1-2-0-objects-are-lazy-by-default"
draft: false
lastmod: "2009-08-14T23:01:50Z"
id: 448948
url: "https://maplye.iteye.com/blog/448948"
---

如果你还是使用以前的mapping的时候就会有可能会出现  
Type '\*\*\*\*\*\*\*' cannot be specified as proxy: method get\_Id should be virtual

这个时候你需要修改\*\*\*.hbm.xml中的  
hibernate-mapping节点上的default-lazy="false"