This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18950|Reply: 0

[Source] Could not determine type for: Decimal , for columns: NHibernate.Mapping.Colum...

[Copy link]
Posted on 11/21/2016 2:02:58 PM | | | |
Could not determine type for: Decimal , for columns: NHibernate.Mapping.Column(xxx)


Here are some of the statements from others on the Internet:

Could not determine type for: decimal, for columns: NHibernate.Mapping.Column(Price)
Can't decide on decimal type??
Properties are defined in C# as decimal types, and mappings are defined as <property name="MyField" precision="5" scale="2"/>

public virtual decimal? Amount { get; set; }

<!--ExplicitDefinedType-->
<property name="Amount" precision="5" scale="2"/>
<!--HeuristicDefinedType-->
<property name="Amount" type="decimal" precision="5" scale="2"/>
<!--InLineDefinedType-->
<property name="Amount" type="Decimal(5,2)"/>
<!--ColumnNode-->
<property name="Amount">
<column name="Amount" precision="5" scale="2"/>
</property>
The above configuration feels that there is no error, but it is an error, and finally it turns out that it is a version problem, which can be passed in NHibernate2.1.2 and NHibernate3.0, but Nhibernate3.3 does not pass.


-------------------------------------- dividing line---------------------------------

My solution:



The reason for the error is that there is an extra space after my type。。。。。 Embarrassing




Previous:MVC resolves the issue of invalidating forms added dynamically by jQuery Validation
Next:C# binary and interconversion between strings
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com