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

Issue Submission: Improper Re-Building of Enum Map Property #9

Open
alexmf91 opened this issue Aug 8, 2023 · 0 comments
Open

Issue Submission: Improper Re-Building of Enum Map Property #9

alexmf91 opened this issue Aug 8, 2023 · 0 comments

Comments

@alexmf91
Copy link

alexmf91 commented Aug 8, 2023

  • Type of Submission
    -[x] Bug Report
    -[ ] Feature Request
    -[ ] Question about Decisions Made in the Repository
    -[ ] Question about How to Use This Project

  • Summary
    First of all, thank you for developing this library. I have come across an issue where the re-building of enum map properties does not occur correctly. Here's an example to illustrate the problem:

Input:

enum CheckoutStatus {
  COMPLETE @map("complete")
  EXPIRE   @map("expire")
  OPEN     @map("open")
}

Incorrect Output:

enum CheckoutStatus {
  COMPLETE
  @map("complete")
  EXPIRE
  @map("expire")
  OPEN
  @map("open")
}

In the provided example, the enum values and their corresponding map annotations are not being re-built properly during code generation.

  • Other Information
    • Detailed Explanation: The issue arises when enum map properties are present in the Prisma schema. The code generation process does not correctly preserve the alignment of enum values and their corresponding map annotations, leading to the incorrect output.

    • Suggestions for Fix: It's recommended to review the code generation logic responsible for handling enum map properties. Ensure that the alignment of enum values and their annotations is maintained during the re-building process. This will help produce accurate and expected output.

    • Related Issues: No related issues have been identified at the moment.

    • Context Links: There's no specific external context for this issue currently available.

Your attention to resolving this matter is greatly appreciated. If you require further information or assistance, please feel free to ask for clarification.

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