-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Another problem w/ proxied class.
PostPosted: Mon Sep 26, 2005 5:23 pm 
Newbie

Joined: Mon Sep 19, 2005 6:08 pm
Posts: 4
Hi,

I'm experiencing another problem related to proxied class. We've implemented session-per-request approach for using NHibernate in ASP.NET code. When I have an NH object loaded from session1 (the object turns out to be a proxy), and make changes to it in session2 and call session.SaveOrUpdateCopy(object), then I get the exception below from NHibernate. If I remove the proxy from the mapping, then all works fine. Can some please help?
Thanks.

Exception:
NHibernateMessage: No persisters for: CProxyTypeSamplingReportTemplate_INHibernateProxy1Stack trace: at NHibernate.Impl.SessionFactoryImpl.GetPersister(Type theClass)
at NHibernate.Impl.SessionImpl.GetPersister(Type theClass)
at NHibernate.Impl.SessionImpl.DoCopy(Object obj, Object id, IDictionary copiedAlready)
at NHibernate.Impl.SessionImpl.SaveOrUpdateCopy(Object obj)
at WaterTrax.WTX.BusinessObj.SampleReportTemplates.SampleTemplates.UpdateReportTemplate(SamplingReportTemplate cTemplate)

Mapping file:

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
   
   <class name="WaterTrax.WTX.WTXObjectModel.SamplingReportTemplates.SamplingReportTemplate, WTXObjectModel" table="tSampSchedReportTemplate" proxy="WaterTrax.WTX.WTXObjectModel.SamplingReportTemplates.SamplingReportTemplate, WTXObjectModel">
   
      <id name="SampSchedReportTemplateID" column="SampSchedReportTemplateID" unsaved-value="0">
         <generator class="identity" />
      </id>
      
      <set name="SampSchedReportFilter" cascade="all-delete-orphan" inverse="true" >
         <key column="SampSchedReportTemplateID" />
         <one-to-many class="WaterTrax.WTX.WTXObjectModel.SamplingReportTemplates.SampSchedReportFilter, WTXObjectModel" />
      </set>
      <set name="SampSchedReportColumn" cascade="all-delete-orphan" inverse="true" >
         <key column="SampSchedReportTemplateID" />
         <one-to-many class="WaterTrax.WTX.WTXObjectModel.SamplingReportTemplates.SampSchedReportColumn, WTXObjectModel" />
      </set>
      
      <property name="FacilityID" column="FacilityID" />
      <property name="ReportName" column="ReportName" />
      <property name="ReportDesc" column="ReportDesc" />
      <property name="ReportTemplateName" column="ReportTemplateName" />
      <property name="BeginDate" column="BeginDate" />
      <property name="EndDate" column="EndDate" />
      
      <property name="IncludesFilterSummary" column="IncludesFilterSummary" />
      <property name="IncludesRecordsEvents" column="IncludesRecordsEvents" />
      <property name="ReportType" column="ReportType" />
      
      <property name="GroupByOption" column="GroupByOption" />
      <property name="CompletionStatusOption" column="CompletionStatusOption" />
      <property name="OutputOption" column="OutputOption" />
      <property name="SubtotalOption" column="SubtotalOption" />
      <property name="CollectionDateOption" column="CollectionDateOption" />
   
   </class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 7:25 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
This is already fixed in 1.0-rc1.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.