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

EntityGenerate should map column names with spaces #1617

Closed
programmatix opened this issue Mar 28, 2021 · 0 comments
Closed

EntityGenerate should map column names with spaces #1617

programmatix opened this issue Mar 28, 2021 · 0 comments
Assignees
Milestone

Comments

@programmatix
Copy link

First thank you for creating this awesome tool!

I ran mikro-orm generate-entities against my Postgres database that has columns containing spaces, and the generate entity code also has spaces that make the code non-compilable:

  @Property({ columnType: 'text', fieldName: 'Start Time', nullable: true })
  Start Time?: string;

As a quick fix replacing non-standard characters like whitespace with underscores would be great.

It would be useful in future to have options controlling column name mapping too, e.g. generating "start_time" or "startTime" instead.

@B4nan B4nan added this to the 5.0 milestone Apr 4, 2021
@B4nan B4nan closed this as completed in 00b54b4 Apr 25, 2021
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

2 participants