laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
177 stars 7 forks source link

[Bug]: Model generate column field on oracle driver wrong #1063

Open yonchando opened 2 months ago

yonchando commented 2 months ago

Bug description

In oracle all columns is UPPER when I generate model eloquent, it generate auto complete field with UPPER. I use model with UPPER field is return null and I use model with lower case it get data normal, but the IDE compliance it magic methods.

Plugin version

8.2.5.242

Operating system

Windows

Steps to reproduce

Step 1: Create model connection to oracle driver

Step 2:

Laravel Idea -> Generate Helper Code

Step 3:

Call model in controller with auto complete column field with UPPER or lower case

$user = User::first();

echo $user->USERNAME; // auto complete from model generate helper but it return null

echo $user->username; // no auto complete and IDE compliance magic methods.

Expected

$user->username Call username with lower from model with auto complete and IDE no compliance

Actual

$user->USERNAME USERNAME is auto complete from generate helper code and IDE know it field of model

Relevant log output

No response

adelf commented 2 months ago

Hello.

What do you use to fetch columns in Laravel Idea? Migrations or Database connection?

If migrations, could you show one of them? If connection, could you show the screenshot of the Database tab with some table columns?

yonchando commented 2 months ago

Hi,

I fetch columns from database connection.

image

adelf commented 2 months ago

Ok. As you see, they are in upper case there. So, do you need only lowercase columns in the helper code?

yonchando commented 2 months ago

Yes, I tested it for Eloquent, If I call column field with uppercase, It get null and use lowercase it get data normal.

yonchando commented 1 month ago

It on where closure too. It use upper case. It could be lower case.