org.springframework.dao.InvalidDataAccessResourceUsageException: could not initialize a collection: [com.clubgold.anlu.bean.MerchantType.merchantSet#192]; nested exception is org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.clubgold.anlu.bean.MerchantType.merchantSet#192]
这是错误信息
我知道是什么原因出的错
是因为merchant这个表中找不到值为外键192时,才报的这个错我对hibernate不太熟  我想问一下  如何设置  能让1对0时不报错,而返回一个空或size为0时的set啊
        <set name="merchantSet" inverse="true" lazy="false" >
            <key column="merchantTypeId"/>
            <one-to-many class="com.clubgold.anlu.bean.Merchant"/>
        </set>这是我原始的设置