views:

45

answers:

1

Hello guys. I've got common mapping

<class name="NotSyncPrice, Portal.Core" table='Not_sync_price'>
<id name="Id" unsaved-value="0">
  <column name="id" not-null="true"/>
  <generator class="native"/>
</id>
<many-to-one name="City" class="Clients.Core.Domains.City, Clients.Core" column="city_id"
             cascade="none"></many-to-one>
<!--<property name="City">
  <column name="city_id"/>
</property>-->

I want to use IStatelessSession for batch insert. But when i set city object to NotSyncPrice object and call IStatelessSession I've got strange exception:

NHibernate.Impl.StatelessSessionImpl.get_Timestamp()

When its null or int all is ok. I try use real && proxy city object. But no result. What's wrong:( Please help

+1  A: 

This could be because of cacheable attribute. If you have marked this entity or the loading criteria query to be cacheable, then it cannot be loaded using a stateless session.

Ravi Ranjan