v8: DB TableBuilder can't handle Currency field types
See original GitHub issueI’ve created a migration plan that attempts to create some DB tables using the TableBuilder helpers and for one of the columns I need it to be a currency field. Now, I can do the following:
Create.Table("myTableName")
.WithColumn("price").AsCurrency().NoNullable()
.Do()
And all of this is valid code (it compiles). However, when the Do()
is executed it throws an exception. The exeception is a bit vague, but I’ve ultimately narrowed it down to the TableBuilder being unable to find a type for DbType.Currency
in the SqlSyntaxProviders DbTypeMap collection.
Ultimately then, the SqlSyntaxProvider.DbTypeMap collection needs updating to hold a type map for the DbType.Currency
type.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Untitled
Letourneux yves marie, Snowdon paths, Fable 2 flourish, Eastern washington elite worlds 2013, Types of meat thermometers? 80s love metal.
Read more >Untitled
Tablebuilder gwt? Suitable wardrobe pocket square, De state police troop 2 fingerprinting. Sungkyunkwan scandal songs list, 86 chevy mud truck.
Read more >Untitled
Bootstrap table builder, Contoh sop purchasing perusahaan, Don't forget to applaud, ... Cannot change line profile picture, Edit voice recorder add reverb, ...
Read more >ABAP Keyword Documentation
A currency field must be linked to the currency key of a structure or of a database table, which determines the currency and...
Read more >Dan Harrin 🦒 (@danjharrin) / X
Filament Table Builder! Quickly build interactive and beautiful TALL-stack tables with PHP! Multiple column types and custom columns Relationship ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dampee decimal is fine, I’ve done a workaround for now using
.AsDecimal(19, 4)
which seems to be the common accuracy for money. The point of this issue is that if you use.AsCurrency()
you’ll get an error because there is no mapping for it. I don’t mind what it maps to, it just needs to map to something 😁This issue has been in the
up for grabs
state for quite a while now and it seems nobody is ready to pick this one up.For now we’ll close this issue to prevent the list of
up for grabs
from becoming very stale. We’re happy to re-open it if someone still thinks it’s good to work on this.If anyone is about to pick this issue up to fix it, make sure to test first if you can reproduce the problem in the latest version before you start to work on it.
Thanks! Sebastiaan on behalf of Umbraco HQ.