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

Field id assumed to exist #27

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

Field id assumed to exist #27

dharmatech opened this issue Feb 9, 2021 · 0 comments

Comments

@dharmatech
Copy link

I ran the following :

dotnet saturn gen Movie Movies Id:int Title:string ReleaseDate:DateTime Genre:string Price:decimal Rating:string

When building, there were many errors like the following:

error FS0039: The type 'Movie' does not define the field, constructor or member 'id'.

The generated code which led to the errors:

image

It looks like Saturn.Cli assumes the existence of a field id. Note that in the above case, the field is Id.

Seems like there are a few ways to resolve this. Saturn.Cli could do one of the following (among other possible suggestions):

  • Refuse to generate code if id is not provided (simplest)
  • Honor a field named Id instead of id
  • Allow the user to specify an id field that is named arbitrarily
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