mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Possibility to build query with JSON TABLE #5555
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dgafka on GitHub (May 24, 2017).
Originally assigned to: @Ocramius on GitHub.
Hey,
In
oracle databaseI can make use of JSON TABLE.In my situation I want to create result record for each object in array (inside json).
So when I will have something like this
[{"name":"cleaning"},{"name":"ironing"}]for entry with id 2, when I will do select, I will get 2 records.The above is just background for the issue.
The sql I need to build in result is something like this:
As you can see there is
no concept of joinin this sql,neither something like JSON_TABLE exists within database mapping(dynamic table). I know I could solve the problem by creating the sql manually, but I really want to usequery builder in here.So is there any chance I could do it? :)
@Ocramius commented on GitHub (May 24, 2017):
This is where you'd just write SQL instead of DQL.
The feature is both platform specific and very data-transformation related, rather than entity-related. The ORM works on 1:1 data-structures mapped from objects to DB records, so this OracleDB functionality lies outside the boundaries of where doctrine can help you.
@dgafka commented on GitHub (May 24, 2017):
Okey, I understand.
Thanks for the response