barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.17k stars 1.16k forks source link

Problem with upper case DB Fields name on Oracle #1384

Open mdemori opened 1 year ago

mdemori commented 1 year ago

Versions:

Versions: ide-helper Version: 2.12.3 Laravel Version: 8.83.25 PHP Version: 7.4.32

Question:

I had to use Oracle as my DB, and I discovered a problem when I request to create stub file for PHPStorm. All DB fields are UPPERCASE but on my project I use the field name as lowecase so the stub files are not reconized.

I found that a PR exist for fixing this problem, https://github.com/barryvdh/laravel-ide-helper/pull/1215 but seem that has never been merged, there is something that I miss to fix this problem or the only way is to wait for the PR will be merged?

thank you

fabianogaldino commented 1 year ago

i have used this solution:

Open file in vendor\barryvdh\laravel-ide-helper\src\Console\ModelsCommand.php

Go to line 502 and add strtolower in column name

$name = strtolower($column->getName());

mdemori commented 1 year ago

@fabianogaldino, thank you for your suggestions I already patched it by myself integrating the original PR in my own fork, but obviously if will be a next version that don't include this change, I must did the change manually again.... I hope for a official solution to be honest.

Thank you

mdemori commented 1 year ago

Hi, sorry if I bump.. but i just saw that PR related to this issue has been closed without merging.. there is some kind of problem to merge the request? below the PR for reference.. https://github.com/barryvdh/laravel-ide-helper/pull/1215