[PR #59] [MERGED] Implemented tableName -> className and columnName -> fieldName mapping in DatabaseDriver. #7655

Closed
opened 2026-01-22 15:56:12 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/59
Author: @asm89
Created: 5/20/2011
Status: Merged
Merged: 6/11/2011
Merged by: @beberlei

Base: masterHead: databasedriver-patch


📝 Commits (3)

  • 262ae7c Implemented tableName -> className and columnName -> fieldName mapping in
  • cec62db Removed _ prefix from private functions.
  • 7ee8dc4 DDC-1179 - Make it possible to specify a namespace when mapping with --from-database

📊 Changes

2 files changed (+115 additions, -14 deletions)

View changed files

📝 lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php (+102 -11)
📝 lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php (+13 -3)

📄 Description

As discussed with beberlei on IRC. This enables custom naming of entities and fieldnames when re-engineering from the database. It can be used when the mapping is done with a script, not by the commandline (yet?).

<?php
// bootstrap
$db = new \Doctrine\ORM\Mapping\Driver\DatabaseDriver(
                    $em->getConnection()->getSchemaManager()
                );
$db->setClassNameForTable('tblArticles', 'Review');
$db->setFieldNameForColumn('tblArticles', 'iArticleId', 'id');

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/59 **Author:** [@asm89](https://github.com/asm89) **Created:** 5/20/2011 **Status:** ✅ Merged **Merged:** 6/11/2011 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `databasedriver-patch` --- ### 📝 Commits (3) - [`262ae7c`](https://github.com/doctrine/orm/commit/262ae7c942ae1afa046b95958ed44a2a18f4ddbf) Implemented tableName -> className and columnName -> fieldName mapping in - [`cec62db`](https://github.com/doctrine/orm/commit/cec62db2d8c6428fc1bd161bac2e221c35d3c79e) Removed _ prefix from private functions. - [`7ee8dc4`](https://github.com/doctrine/orm/commit/7ee8dc4e44e3a761b8dab23a18ded74c9f10d7a3) DDC-1179 - Make it possible to specify a namespace when mapping with --from-database ### 📊 Changes **2 files changed** (+115 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php` (+102 -11) 📝 `lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php` (+13 -3) </details> ### 📄 Description As discussed with beberlei on IRC. This enables custom naming of entities and fieldnames when re-engineering from the database. It can be used when the mapping is done with a script, not by the commandline (yet?). ``` php <?php // bootstrap $db = new \Doctrine\ORM\Mapping\Driver\DatabaseDriver( $em->getConnection()->getSchemaManager() ); $db->setClassNameForTable('tblArticles', 'Review'); $db->setFieldNameForColumn('tblArticles', 'iArticleId', 'id'); ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:56:12 +01:00
admin closed this issue 2026-01-22 15:56:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7655