Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int not supported as type for id #29

Open
dharmatech opened this issue Feb 9, 2021 · 0 comments
Open

int not supported as type for id #29

dharmatech opened this issue Feb 9, 2021 · 0 comments

Comments

@dharmatech
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant