Open janpio opened 8 months ago
Really expecting this to be resolved.
Gonna look obvious, but for the moment, as for the issue of "0000-00-00" datetime (null dates in old MariaDB versions), when I need to make JOINs, I create my own queries using $queryRaw :
const myRows = await this.prisma.$queryRaw<{anyColumn: number, otherColumn: string}[]>`
SELECT anyColumn, otherColumn
FROM yourTable
JOIN anotherTable ON anotherTable.columnId = yourTable.someColumnId
WHERE yourCondition = 'something'
`;
π
In versions 5.7.0 and 5.10.0 we released support for a new relation load strategy for PostgreSQL and MySQL as part of the
relationJoins
preview feature:Although they usually overlap, this currently does not include MariaDB via the
mysql
datasource provider.Unfortunately MariaDB does not support correlated subqueries, the method we use for this new relation load strategy for MySQL. (It also does not supports lateral joins, the method we use for PostgreSQL.) We would need to implement a completely different approach for MariaDB.
This issue is to track demand and use cases for implementing this new relation load strategy for MariaDB.
β οΈ Please upvote the issue by leaving a π reaction. (Please do not comment with
+1
or similar. Only "upvotes" on the issue itself will be taken into account, and comments without actual content will be hidden.)