Very confusing, because the initial error is about a 'Product' invalid
name. Looking to your mapping, you dont have a Product class..




2016-09-27 9:47 GMT-03:00 Waqas Hameed <[email protected]>:

> Thanks for reply.
>
> The entity name is PaymentProduct and following is mapping
>
> <?xml version="1.0" encoding="utf-8"?>
> <hibernate-mapping assembly="Domain" namespace="Domain"
> xmlns="urn:nhibernate-mapping-2.2">
>   <class name="PaymentProduct" table="PaymentProduct" lazy="true" >
>     <id name="Id" column="Id">
>       <generator class="identity" />
>     </id>
>     <property name="TenantId">
>       <column name="TenantId" sql-type="int" not-null="true" />
>     </property>
>     <property name="Name">
>       <column name="Name" sql-type="nvarchar" not-null="true" />
>     </property>
>     <property name="Description">
>       <column name="Description" sql-type="nvarchar" not-null="false" />
>     </property>
>     <property name="IsDeleted">
>       <column name="IsDeleted" sql-type="bit" not-null="true" />
>     </property>
>     <property name="CreatedDate">
>       <column name="CreatedDate" sql-type="datetime" not-null="true" />
>     </property>
>     <property name="CreatedBy">
>       <column name="CreatedBy" sql-type="int" not-null="true" />
>     </property>
>     <property name="UpdatedDate">
>       <column name="UpdatedDate" sql-type="datetime" not-null="true" />
>     </property>
>     <property name="UpdatedBy">
>       <column name="UpdatedBy" sql-type="int" not-null="true" />
>     </property>
>     <property name="ProductSetId">
>       <column name="ProductSetId" sql-type="int" not-null="false" />
>     </property>
>    <many-to-one name="FeatureType">
>       <column name="FeatureId" sql-type="int" not-null="false" />
>     </many-to-one>
>     <!--<property name="FeatureType" column="FeatureId"/>-->
>     <!--<many-to-one name="FeatureType">
>       <column name="FeatureId" sql-type="int" not-null="false" />
>     </many-to-one>
>
>     <many-to-one name="BusinessUnit">
>       <column name="BusinessUnitId" sql-type="int" not-null="false" />
>     </many-to-one>
>
>     <many-to-one name="CreditCardhouse">
>       <column name="ClearinghouseId" sql-type="int" not-null="false" />
>     </many-to-one>-->
>
>
>
>     <!--<property name="BusinessUnit">
>       <column name="BusinessUnitId" sql-type="int" not-null="false" />
>     </property>-->
>     <!--<property name="ProductId">
>       <column name="ProductId" sql-type="int" not-null="true" />
>     </property>-->
>     <!--<property name="CreditCardClearinghouse">
>       <column name="ClearinghouseId" sql-type="int" not-null="false" />
>     </property>-->
>     <property name="BankAccountId">
>       <column name="BankAccountId" sql-type="int" not-null="false" />
>     </property>
>     <property name="TenantBankAccountId">
>       <column name="TenantBankAccountId" sql-type="int" not-null="false" />
>     </property>
>     <property name="HoldBankAccountId">
>       <column name="HoldBankAccountId" sql-type="int" not-null="false" />
>     </property>
>     <property name="EscrowTransferCycle">
>       <column name="EscrowTransferCycleId" sql-type="int" not-null="true"
> />
>     </property>
>     <property name="IsSalProduct">
>       <column name="IsSalProduct" sql-type="bit" not-null="true" />
>     </property>
>     <!--<property name="MerchantAccount">
>       <column name="MerchantAccountId" sql-type="int" not-null="false" />
>     </property>-->
>     <property name="FlowOfFundsId">
>       <column name="FlowOfFundsId" sql-type="int" not-null="true" />
>     </property>
>     <property name="CreditCardFlowOfFundsId">
>       <column name="CreditCardFlowOfFundsId" sql-type="int"
> not-null="false" />
>     </property>
>     <property name="TermsAndConditionsLabel">
>       <column name="TermsAndConditionsLabel" sql-type="varchar"
> not-null="false" />
>     </property>
>     <property name="ClientBankAccountId">
>       <column name="ClientBankAccountId" sql-type="int" not-null="false" />
>     </property>
>     <property name="SplitTransactionMerchantAccountId">
>       <column name="SplitTransactionMerchantAccountId" sql-type="int"
> not-null="false" />
>     </property>
>     <property name="PaymentReceiptText">
>       <column name="PaymentReceiptText" sql-type="varchar"
> not-null="false" />
>     </property>
>     <property name="PaymentVendorId">
>       <column name="PaymentVendorId" sql-type="int" not-null="false" />
>     </property>
>     <set name="CustomPaymentFieldDefinitions" cascade="all" >
>       <key column="ProductId"/>
>       <one-to-many class="PaymentCustomFieldDefinitions"/>
>     </set>
>   </class>
> </hibernate-mapping>
>
> On Tuesday, 27 September 2016 16:56:11 UTC+5, Waqas Hameed wrote:
>>
>> Hi,
>>
>> I am getting N-hibernate exception in ASP.Net MVC application when bulk
>> of user accessing application.
>>
>> Detail : An ExceptionDetail, likely created by
>> IncludeExceptionDetailInFaults=true, whose value is:
>> NHibernate.Exceptions.GenericADOException: could not load an entity:
>> Product
>> System.Data.SqlClient.SqlException: Invalid object name 'Product'.
>> at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
>> Boolean breakConnection, Action`1 wrapCloseInAction)
>> at 
>> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
>> stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
>> at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior,
>> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
>> bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
>> at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
>> at System.Data.SqlClient.SqlDataReader.get_MetaData()
>> at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
>> ds, RunBehavior runBehavior, String resetOptionsString)
>> at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
>> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async,
>> Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
>> at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
>> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
>> TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean
>> asyncWrite)
>> at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
>> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
>> at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
>> behavior, String method)
>> at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
>> behavior)
>> at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
>> at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
>> at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean
>> autoDiscoverTypes, Boolean callable, RowSelection selection,
>> ISessionImplementor session)
>> at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session,
>> QueryParameters queryParameters, Boolean returnProxies)
>> at 
>> NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor
>> session, QueryParameters queryParameters, Boolean returnProxies)
>> at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session,
>> Object id, IType identifierType, Object optionalObject, String
>> optionalEntityName, Object optionalIdentifier, IEntityPersister persister)
>> --- End of inner ExceptionDetail stack trace ---
>> at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session,
>> Object id, IType identifierType, Object optionalObject, String
>> optionalEntityName, Object optionalIdentifier, IEntityPersister persister)
>>
>>
>> Please help me how to solve this issue.
>>
>> Thanks
>>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to