-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
v4.2.0 may have broken sqlite support #1009
Comments
Well, without a reproduction I dont really have a way to help. My tests are working just fine and you are the only one with such issue so far. So please provide something I can try, otherwise will close it. Maybe you could share at least the problematic entity definition and ORM bootstrap script/config. Also verify the latest dev version ( My guess is that it is caused by order of entities in which they get discovered, but without a repro... :] |
Any updates? This should be extremely easy to replicate, as it is just about entity definition. |
I'll try the last dev version tomorrow. After that I'll try to reduce the scope to isolate the issue but as I mention we have a lot of entities and a lot of relationships that make it hard to trim down. Worst case I might have to grant you a temporary read access to the repo. I'll update you tomorrow or Tuesday. |
@B4nan I ended up creating a separate repo where it's easy to replicate, and added you as a collaborator. I added instructions in the readme but it's pretty straightforward. Let me know if you have any questions. I can also do some slack or discord if ever you need some more direct messaging. Thanks |
I can't even install the native dependencies. Please turn that into a reproduction, I am not interested in your app :] It is issue with schema generation, so include only entity definitions and script that prints the dump, literally no 3rd party modules are needed for this. And don't forget to remove all entities that are working fine. |
All right this is as small as I can make it: https://gist.github.com/maphe/33e6bc2a59aedbc4afa79b8cf75498ae Also worth noting this one fails with both 4.1 and 4.2 so it might not be specific to 4.2. |
Perfect, thanks, will look into this probably later today! |
Please test it via |
I tried with the following in package.json: "@mikro-orm/core": "4.2.4-dev.97",
"@mikro-orm/mysql": "4.2.4-dev.97",
"@mikro-orm/nestjs": "4.2.0",
"@mikro-orm/sqlite": "4.2.4-dev.97",
"@mikro-orm/knex": "4.2.4-dev.97", Still seeing the same issue:
|
Your test case is included in the CI now and is passing, so if this does not work for you, adjust the reproduction. Also double check the changes are really pulled in your project, maybe you have some dependency resolution issue (like multiple versions or the orm installed), so try wiping node_modules too. |
I finally have it working but I had to force the following: "resolutions": {
"@mikro-orm/knex": "4.2.4-dev.97"
}, I think there's an issue somewhere in your dependencies where Anyway I think that should clean up when you release a final version. |
That's just how semver works |
Fair enough. Might be a good idea to clean up the |
That is unfortunately no longer possible (and when I had this issue before, unpublishing actually did not help anyway). Just NPM things... 🤷
( It was caused by |
All right, thanks for the details, and thanks for the fix 👍 I can wait until last stable version. |
Describe the bug
I attempted upgrading our project from 4.1.1 to 4.2 and our test suite running on sqlite is all broken. It looks like the schema generator omits some columns when creating the db. Omitted columns are all tagged
@ManyToOne
, but not all@ManyToOne
columns get omitted. 🙃Is there any breaking changes I should have applied in the configuration?
Stack trace
To Reproduce
I tried my best isolating the issue to provide easy reproduction steps but I couldn't manage to get anything. My little tests with small dummy entities worked fine. Our production DB has 45 tables and references all across, the schema generator seems to be missing about 5 to 10 columns spread in different tables.
There is also no obvious difference between a
@ManyToOne
column that gets created, and another that doesn't. I just can't put my finger on what's going on, all I can tell is that toggling between 4.1 and 4.2 makes it or breaks it.Additional context
Let me know if there'a any relevant log or data I could provide without flooding you with a pile of entities and configuration.
The text was updated successfully, but these errors were encountered: