IStatelessSession insert object with many-to-one
        Posted  
        
            by Andrew Kalashnikov
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andrew Kalashnikov
        
        
        
        Published on 2010-06-09T03:28:47Z
        Indexed on 
            2010/06/09
            3:32 UTC
        
        
        Read the original article
        Hit count: 380
        
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
© Stack Overflow or respective owner