Skip to content

int not supported as type for id #29

@dharmatech

Description

@dharmatech

If I follow the steps in the how to start guide, however, use id:int instead of id:string:

dotnet new saturn
dotnet tool restore
dotnet saturn gen Book Books id:int title:string author:string
dotnet saturn migration

Router.fs : browserRouter

  Add the following line

    forward "/books" Books.Controller.resource

dotnet fake build

I get the following error when building:

error FS0001: The type 'int' does not have 'null' as a proper value

This is due to the following line in BooksModel.fs:

fun u -> if isNull u.id then Some ("id", "Id shouldn't be empty") else None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions