liubiao4123 / servicestack

Automatically exported from code.google.com/p/servicestack
0 stars 0 forks source link

ORMLite Sql Service Dialect - change column decimal definition #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Persist a decimal into SqlServer database table (e.g. 0.175)

What is the expected output? What do you see instead?
Expected: Should persist value correctly (0.175).  
Actual: rounds value to nearest integer (1)

Please provide any additional information below.
Sql Server by default creates the decimal column with precision (18,0). i.e not 
allowing for decimal places.

Fixed this by changing DecimalColumnDefinition in the 
SqlServerOrmLiteDialectProvider to "DECIMAL(38,6)".  

Original issue reported on code.google.com by grantwgm...@live.com on 20 Jul 2010 at 3:40

GoogleCodeExporter commented 8 years ago
Hey Grant,

I've added this fix and will be available on the next version of Service Stack, 
which will be available once I fix another couple outstanding issues.

Thanks for reporting and providing the fix!

- Demis

Original comment by demis.be...@gmail.com on 26 Jul 2010 at 1:00

GoogleCodeExporter commented 8 years ago

Original comment by demis.be...@gmail.com on 11 Aug 2010 at 3:14