paljs/create-nexus-type

Field named model inside model fails to generate code

Closed this issue · 1 comments

Thanks for a sweet lib. Make stuff easy to work with.

Found an issue with a field name model inside of a model.
Just checked the source fast and I think I saw the issue. Leaving this here for now and dropping a PR if I manage to sort it out later on.

Example not working:

model Car {
  id              Int         @id
  model_year      Int         @default(0)
  license_plate   String       @default("")
  brand           Brand
  model           Model 
}

This works:

model Car {
  id              Int         @id
  model_year      Int         @default(0)
  license_plate   String       @default("")
  brand           Brand
  car_model           Model
}

Thanks @blombergniklas for catch this error i fixed it and pushed inv1.1.6 please update your version thanks .