Have 2 MySQL databases. One is the main database, the other is used for geolocation data. Now, for SubSonic to play nice with the generated files via Subcommander, I made it easy and just created a view that maps to the geolocation data in the other database (that way all the tables and geolocation data is technically in one database).
Now, the issue I'm running into is this: In the geolocation table, there are 2 fields (latitude, longtitude) which are both floats.
When I run your standard SubSonic statement to get the data:
return new Select()
.From(ZipDatum.Schema)
.Where(ZipDatum.Columns.Zipcode).IsEqualTo(zipCode)
.ExecuteSingle<ZipDatum>();
I get this exception in my tests project: 'TestCanGetZipData' failed: System.ArgumentException : Object of type 'System.Single' cannot be converted to type 'System.Decimal'.
It looks like SubSonic likens float fields to decimal. But this exception is throwing me for a loop. Any way to get around this? FWIW, on all of the other 200+ tables we're using decimal for our fields that require such. But since this is a 3rd party database table, they're using float and it's causing issues.
Anyone run into this situation?