question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v8: DB TableBuilder can't handle Currency field types

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mattbrailsfordcommented, May 2, 2019

@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 😁

0reactions
nul800sebastiaancommented, Sep 4, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found