Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Giu 23 posts 141 karma points
    Apr 20, 2020 @ 09:56
    Giu
    0

    Unable to set precision for a decimal column for a poco object

    I am looking at the source in Umbraco v7 and v8 - more specifically Umbraco.Core.Persistence.DatabaseAnnotations - and I am trying to set up a decimal column with custom precision (7, 2).

    So far, when I run DatabaseSchemaHelper.CreateTable it creates the column with default precision (20, 9).

    Is there a package / attribute (like LengthAttribute but for decimal) available for this scenario ?

    I can see that there is no plug-and-play logic to collect custom db attributes like LengthAttribute in separate projects & DefinitionFactory has an 'internal' access modifier. Am I missing an easy solution ?

    Best regards,

    Giuliano

Please Sign in or register to post replies

Write your reply to:

Draft