Bug #361

avatar

Decimal not being compatible with Double

Added by Nils Wiegner 5409 days ago.

Status:New Start:03/04/2010
Priority:Normal Due date:
Assigned to:avatarMirco Bauer % Done:

0%

Category:- Spent time: -
Target version:-
Votes: 0

Description

Scenario:

MSSQL DB contains a "money" field which is being mapped as "double" - SmartDao triggers an InvalidOperationException since "double" doesn't match "money" - needs an implicite cast to decimal.

Exception:

Program: mmxDebitCredit.exe
Version: 0.1.0.0

Inner-Exception Type:
System.InvalidOperationException

Inner-Exception Message:
Property type: System.Nullable`1[System.Double] of Gsd.Mapmas.Commands.Accounting.DebitCreditRecord doesn't match column type: System.Decimal for column: UeberwBetrag1

Inner-Exception StackTrace:
  at Meebey.SmartDao.Query`1[Gsd.Mapmas.Commands.Accounting.DebitCreditRecord].SetPropertyValue (Gsd.Mapmas.Commands.Accounting.DebitCreditRecord row, System.String columnName, System.Object columnValue) [0x00000] 
  at Meebey.SmartDao.Query`1[Gsd.Mapmas.Commands.Accounting.DebitCreditRecord].CreateDBObject (IDataReader reader) [0x00000] 
  at Meebey.SmartDao.Query`1[Gsd.Mapmas.Commands.Accounting.DebitCreditRecord].GetAll (Gsd.Mapmas.Commands.Accounting.DebitCreditRecord template, Meebey.SmartDao.GetOptions options) [0x00000] 
  at Meebey.SmartDao.Query`1[Gsd.Mapmas.Commands.Accounting.DebitCreditRecord].GetAll (Gsd.Mapmas.Commands.Accounting.DebitCreditRecord template, System.String[] selectColumns) [0x00000] 
  at Meebey.SmartDao.Query`1[Gsd.Mapmas.Commands.Accounting.DebitCreditRecord].GetSingle (Gsd.Mapmas.Commands.Accounting.DebitCreditRecord template, System.String[] selectColumns) [0x00000] 
  at Gsd.Mapmas.Commands.ItemRecordCommandBase`2[Gsd.Mapmas.Items.DebitCreditItem,Gsd.Mapmas.Commands.Accounting.DebitCreditRecord].GetSingle (Gsd.Mapmas.Items.DebitCreditItem pkItem, IList`1 selectFields) [0x00000] 

Exception Type:
Gsd.Mapmas.ServerException

Exception Message:
Property type: System.Nullable`1[System.Double] of Gsd.Mapmas.Commands.Accounting.DebitCreditRecord doesn't match column type: System.Decimal for column: UeberwBetrag1

Exception StackTrace:
  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] 

Also available in: Atom PDF