-
Notifications
You must be signed in to change notification settings - Fork 283
Didn't Found Entity Column Error #191
Comments
Can you please provide DDL statements for your database? I have to reproduce the issue to know what's going wrong. Tests pass on mariadb, so it looks like it's some specific case. |
Thanks for looking into this. The table I ran the script against looked like this:
Let me know if you need any further information. |
I couldn't reproduce your issue - it generated proper entities for me. I used just simple model generation, without additional flags which might be the reason( Which exactly db version are you using? Are you using any additional flags, or just simple model generation? |
I've done a bit more digging and I can reproduce the issue reliably though I'm not really sure why it is happening. I don't think it's anything to do with my specific schema. If I create a new database and import the SQL I can run: npx typeorm-model-generator -h localhost -e mariadb -d test -u root -x password -p 3306 and it works fine. If I then rename the database to test2 using SequelPro and run npx typeorm-model-generator -h localhost -e mariadb -d test2 -u root -x password -p 3306 It will then fail with the error: Relation between tables User_Role and user didn't found entity model user. So I think the issue might be Sequel Pro doing something weird to the database if you rename it although I don't know quite what. I can now easily work around this issue so I'm happy for you to close, but I thought I'd provide you with the information in case you wanted to look into it further. |
Probably renaming database(tool doesn't matter) produces this bug. I will keep this open till I have some more time to fix the issue. |
Just testing out this tool with a simple Maria database with User, Role and User_Role tables with a many to many relationship and I got this error.
I think it's expecting some kind of naming convention, but I'm not sure what's expected?
The text was updated successfully, but these errors were encountered: