mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #293] [MERGED] [DDC-1663]Native SQL Query Result Set Mappings #7985
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/293
Author: @FabioBatSilva
Created: 2/29/2012
Status: ✅ Merged
Merged: 4/16/2012
Merged by: @guilhermeblanco
Base:
master← Head:DDC-1663📝 Commits (10+)
530e484native query annotations91e4702named native query metadata2b99612sql result set mapping metadatabfc7986annotation driver and basic support015ea80added support for resultClass and empty fields3b79951mapping driver testsf018a56test native query with result classf813223test joined one-to-many and one-to-one0cc2583test scalar result68665aftest discriminator column📊 Changes
36 files changed (+3470 additions, -19 deletions)
View changed files
📝
doctrine-mapping.xsd(+46 -0)📝
lib/Doctrine/ORM/EntityRepository.php(+15 -0)📝
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(+60 -0)📝
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(+257 -1)➕
lib/Doctrine/ORM/Mapping/ColumnResult.php(+42 -0)📝
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php(+52 -0)📝
lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php(+7 -0)📝
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php(+52 -0)📝
lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php(+70 -4)➕
lib/Doctrine/ORM/Mapping/EntityResult.php(+58 -0)➕
lib/Doctrine/ORM/Mapping/FieldResult.php(+48 -0)📝
lib/Doctrine/ORM/Mapping/MappingException.php(+52 -7)➕
lib/Doctrine/ORM/Mapping/NamedNativeQueries.php(+40 -0)➕
lib/Doctrine/ORM/Mapping/NamedNativeQuery.php(+63 -0)➕
lib/Doctrine/ORM/Mapping/SqlResultSetMapping.php(+56 -0)➕
lib/Doctrine/ORM/Mapping/SqlResultSetMappings.php(+40 -0)📝
lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php(+156 -1)📝
tests/Doctrine/Tests/Models/CMS/CmsAddress.php(+119 -0)📝
tests/Doctrine/Tests/Models/CMS/CmsUser.php(+294 -0)📝
tests/Doctrine/Tests/Models/Company/CompanyContract.php(+42 -0)...and 16 more files
📄 Description
Hello
http://www.doctrine-project.org/jira/browse/DDC-1663
This patch adds support for native query mapping
This is not complete yet but a would like to get your sugestions about this.
The following annotations have been added :
@NamedNativeQuery: Is used to specify a native SQL named query.@SqlResultSetMapping: Is used to specify the mapping of the result of a native SQL query.@EntityResult: References an entity in the SELECT clause of a SQL query.@FieldResult: Is used to map the columns specified in the SELECT list of the query to the properties or fields of the entity class.@ColumnResult: References name of a column in the SELECT clause of a SQL query. (scalar values)It is a very big feature so any suggestion are welcome. :)
Thanks
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.