mirror of
https://github.com/doctrine/orm.git
synced 2026-04-25 07:28:04 +02:00
DDC-701: Code generation for DQL queries #862
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 @doctrinebot on GitHub (Jul 20, 2010).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user romanb:
It would be cool to have the possibility to define DQL queries in the mapping documents and let these be precompiled to SQL via a command-line code-generation target that produces for each DQL query the SQL and ResultSetMapping in native PHP code.
This allows people to work without a query cache and maximum performance, on the cost of another code-generation step.
There are already named queries currently but these must be defined in the Configuration at runtime and thus it does not bear any advantages.
I would propose removing this runtime named query facility and replacing it with a "compile-time" one. So that "named queries" are queries defined in the mapping, given a name, which can optionally be precompiled via the CLI. If not precompiled a named query should be handled like a normal query.