mikro-orm
mikro-orm copied to clipboard
Mssql support
I think the orm should include mssql as a supported database type by default instead of doing a custom database setup
there is some WIP here:
https://github.com/UTGuy/mikro-orm-mssql
Going forward I'd like to support it natively, although not a priority.
there is some WIP here:
https://github.com/UTGuy/mikro-orm-mssql
Going forward I'd like to support it natively, although not a priority.
I am actually starting out a new project in about two weeks later which is on mssql and wanted to use mikroorm instead of sequelize but I am not only the sole developer in the project so we are looking for sequelize alternative which supports mssql out of the box
Will try to spend few hours to check how much is actually done and what is the needed effort to support it.
@B4nan any updates
nope
https://blog.sindresorhus.com/issue-bumping-e3b9740e2a0
I must say SQL server has very weird limitations. First I hit the issue with composite FKs that are sometimes impossible to create in a lazy manner due to SQL server trying to be too smart/strict (it does not allow setting cascading). Now I see Cannot insert explicit value for identity column in table 'book_tag2' when IDENTITY_INSERT is set to OFF.
🤷
Why are people using this? :P Seriously, go with postgres people :P
Anyway, I have around 2/3 tests passing, disabled FKs in the schema generator for now, I know what to do to make it work (and it will also allow having FKs in sqlite at least for creating new tables). So still not there, still few days/weeks ahead of me.
yes, Sql server is too smartass .I came up with those problems when i migrated from pg to mssql
Is this is still in progress? Originally I think it was listed as an issue worth exploring in v5 (https://github.com/mikro-orm/mikro-orm/issues/1623), but its not listed there anymore. If there are any blockers, how could someone help? Thanks!
I believe B4nan worked on it in this MR https://github.com/mikro-orm/mikro-orm/pull/1375 guess you could have a look at it if you're interested?
There is no progress, I don't consider this as something important, I gave it a try several times, but as for someone who never used mssql, the way that driver behaves is too much out of space to understand it. The blocker is schema generation and diffing, namely complex composite PKs and FK constraints, as that works differently than the rest of SQL drivers.
As said, there is a WIP PR, feel free to give it a try yourself if it is important to you.
If there would be some company willing to sponsor the driver development, that would be a different story.
I just recently updated those drivers. While schema generation is out of the question the driver does function perfectly fine. I also added a Unicode type to handle nvarchar columns.
I cannot use Micro ORM because it does not support MS SQL
I have opened a bug bounty for this issue https://app.bountysource.com/issues/92424462-mssql-support if that is okay with you @B4nan. @sauravyadav1958 if you can't donate with your time and it's that important for you, you might consider adding to the bounty to help the creator or @UTGuy make an implementation.
FYI we are quite close to bringing this live. Last missing piece of puzzle is the schema diffing .
With that said, it took a lot of time already for me as well as @UTGuy, so being close does not mean it will happen soon :]
Intereting idea with the bug bounty, it can definitely change the order of priorities. For me this was kind of a black hole for my spare time, so I usually favour issues I can deal with within hours and not weeks :D I think it would be fair to divide that somehow between me and @UTGuy once we finilize this.
I don't mind donating to an almost-finished feature, I love the stability of Mikro-Orm (switched from TypeOrm) and unit-of-work of course. Bug bounties are meant to show interest in certain features (and it might alter the priority, which would be a plus for me personally :D). You can do a joint claim with @UTGuy I think, otherwise, the claimer needs to distributor it manually. Feel free to prioritize how you see fit, I am just placing it to show my support.
About to start a rather large project that relies on a SQL Server DB.. would love to use Mikro ORM, is this driver still a ways out from being pulled in?
Any news about this?
most other orms use tedious
package to work with mssql maybe that would help
Will be good to incapsulate tedious into mikro-orm-mssql driver. Is it possible?
Another ORM called RDB supports mssql. github.com/alfateam/rdb
After many obstacles, #1375 is near the finish line and will be part of v6.2.
@B4nan Great news, thanks. We are looking forward to testing it.