Closed Ahmed-Elrayes closed 1 year ago
Hi. Can you share the full code statement?
This is one statement.
This is another one
Does CompetitorUser
model has $table
property defined? How is the table itself named? What do your plugin settings look like?
For the second, just out of curiosity - does it work if you rename first declaration of $query
variable to something else, but leave $query = match
name variable name unchanged? Or vice versa
CompetitorUser
has $table
in it yes. and the table name is competitors_users
the valriable $query
can be renamed and still have the same issue, actually this issue is in the whole project.
since you mentioned plugin settings, it seems that this issue occurred only to this project, all my other projects are working fine, and it's weird because i'm pretty sure i did not change any setting, it just happened once i updated the plugin.
to be more specific: this was the project i had open when i updated the plugin.
and here is the settings for it
If you temporarily unselect Filter data sources
? Is it for sure correct dabase selected? Is it refreshed and up to date in Databases
toolbar view?
the issue still persists if i unselect filter data sources. the database is for sure selected yeah i even deleted the datasource in Database toolbar and added it again and still persists.
Managed to fix it finally, had to delete the laravel-query-settings.xml file from .idea folder
There must be something happened to the settings file when i updated the plugin
here is how it did look inside
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="LaravelQuerySettings">
<option name="filterDataSources" value="true" />
<option name="filteredDataSources">
<set>
<option value="30eca40e-d219-4cd8-bf22-f78372aabbbd<-/lq/->linda" />
</set>
</option>
<option name="tablePrefix" value=" " />
</component>
</project>
i believe the issue was in this line
<option name="tablePrefix" value=" " />
Most likely. Should probably trim this value before saving. Don't think in any database spaces are allowed in table names 🤔
i actually don't do any table prefixes, so i'm not sure why it was added
Most likely by accident
i see, thanks a lot. i hope at least you can make something for this in the future to trim any spaces before saving. i will close this issue.
Had the same issue. Deleting the .xml fixed it. Thx Ahmed-Elrayes
You are welcome, glad that it helped you.
Hello, since the last update i keep getting unknown column even though i'm sure that i have the datasource added and even selected the database i want for the query in settings..![image](https://user-images.githubusercontent.com/30704271/192062342-e5f56e54-7430-4a7c-a639-3428b1090289.png)