mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

17K
active users

Who uses #Prisma as their ORM?

What is your opinion about how they "join" the data when using "include" in your query?

They make two select statements and then join the data at their engine level instead of the database level.

@skwee357 ORM, in general, are good, but this decision to not use the database is a bit strange.

They argue that they are aware of the issue and trying to fix it, as a friend pointed out in this discussion github.com/prisma/prisma/issue

but still a strange decision from the first phase.

I am not trashing the project, they are good but somehow strange to me as an outsider 😅

GitHubUse `JOIN`s in more queries · Issue #5184 · prisma/prismaBy DakotaLarson

@zaherg ORMs are good for simple CRUD. Once you need something more complex, you find yourself fighting the ORM or resorting to raw queries anyway

@skwee357 depending on the ORM you use.

In many cases, while working with Laravel , I was able to do complex queries with Eloquent, which allowed me also to pass some RAW SQL statements.

I am not an expert in Prisma, but they have the ability to execute RAW SQL statements.

Dmitry Kudryavtsev

@zaherg Not sure about Eloquent, didn’t touch for a long time.

But I would be surprised to find an ORM that support window functions for example

@skwee357 in eloquent, I can write something like

Employee()->select('salary', DB::raw('SUM(salary) OVER() sum_salary'))->get()

And it will work.

@zaherg Interesting. I wonder what query it generates