[PR #160] [MERGED] Allow to unset one-to-one relation with generated class #7793

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/160
Author: @goetas
Created: 10/19/2011
Status: Merged
Merged: 11/13/2011
Merged by: @beberlei

Base: masterHead: generation


📝 Commits (10+)

  • e19fd75 Better indentation for generated class
  • 9c1202a Added on generated class.
  • 8f09281 Spaces
  • be3adfb With TO_MANY relations, class filed is instanceof ArrayCollection,
  • 596ba3d Collection inteface instead of ArrayCollection
  • fe84a61 Better code generation when association is nullable
  • d4059b8 Nullable relations, fixing join condition
  • 5f80b57 Improoved coding standards
  • f533074 Coding standards
  • 7efd615 Coding standards

📊 Changes

1 file changed (+28 additions, -5 deletions)

View changed files

📝 lib/Doctrine/ORM/Tools/EntityGenerator.php (+28 -5)

📄 Description

Added on generated class.
This generate methods like:

}

that allow to remove "Group" association if the relation is one-to-one.

Plus some indentation issue



---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/160 **Author:** [@goetas](https://github.com/goetas) **Created:** 10/19/2011 **Status:** ✅ Merged **Merged:** 11/13/2011 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `generation` --- ### 📝 Commits (10+) - [`e19fd75`](https://github.com/doctrine/orm/commit/e19fd756cbc5f57e696a91b8b3626747c70c0192) Better indentation for generated class - [`9c1202a`](https://github.com/doctrine/orm/commit/9c1202a76667d8e778a29d008a54c4ad3bda9c2e) Added <variableDefault> on generated class. - [`8f09281`](https://github.com/doctrine/orm/commit/8f092812c42dfae3f0c80f504c1766812bf59443) Spaces - [`be3adfb`](https://github.com/doctrine/orm/commit/be3adfb35ebb0c4139f8ee4cae7b88ff8c9cd5c9) With TO_MANY relations, class filed is instanceof ArrayCollection, - [`596ba3d`](https://github.com/doctrine/orm/commit/596ba3d5b1e32f685f77e116524c83621573edb8) Collection inteface instead of ArrayCollection - [`fe84a61`](https://github.com/doctrine/orm/commit/fe84a61d0b24ecc9bb5ba323e56a2fb00eaf3263) Better code generation when association is nullable - [`d4059b8`](https://github.com/doctrine/orm/commit/d4059b88ca8048d655015682262c3b9b9976b5a1) Nullable relations, fixing join condition - [`5f80b57`](https://github.com/doctrine/orm/commit/5f80b575541d53489f651f9d50aa44db5bdb49df) Improoved coding standards - [`f533074`](https://github.com/doctrine/orm/commit/f5330741ac1bff9e015172e2ec9c2a3f019cd84b) Coding standards - [`7efd615`](https://github.com/doctrine/orm/commit/7efd615b8c6d6658b05740c923170ef8a24dbba7) Coding standards ### 📊 Changes **1 file changed** (+28 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Tools/EntityGenerator.php` (+28 -5) </details> ### 📄 Description Added <variableDefault> on generated class. This generate methods like: ```function setGroup(Group $group = null){ } ``` that allow to remove "Group" association if the relation is one-to-one. Plus some indentation issue ``` --- <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:54 +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#7793