新手nhibernate问题
一、ORA-12514: TNS:listener does not currently know of service requested in connect
注释掉的字符串改为红色串即可
<connectionStrings>
<add name="Connection String" connectionString="Data Source=dddd;User ID=xxxx;Password=yyyy" providerName="System.Data.OracleClient"/>
<add name="Connection String" connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dbxxxxx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=svcxxxx)));User Id=xxxx;Password=yyyy;" providerName="System.Data.OracleClient"/>
</connectionStrings>
二、NHibernate.StaleStateException : Unexpected row count: 0; expected: 1
数据保存时出错,检查一下发现本应自动生成的UUID字段被手动赋值。。。stupid me!
三、failed: NHibernate.MappingException : Could not determine type for: byte[], for columns: NHibernate.Mapping.Column(ATTACHMENT)
Blob字段对应的hbm.xml文件中
<property name="Attachment" column="ATTACHMENT" type="byte[]"/>
去掉红色部分错误消失(still don't know why-_-#)
<property name="Attachment" column="ATTACHMENT" type="byte[]"/>