mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3284: Yaml mapping. Comment on table and realtion #4063
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 (Aug 29, 2014).
Originally assigned to: @Majkl578 on GitHub.
Jira issue originally created by user Kilrogg:
Is there any way to comment my tables and table relations with yml schema?
I can comment plain field like this
But for relation:
Or for whole table:
It doesn't work at all. When I perform migrations those comments are totally ignored. And I can't find any documentation for yml mapping table commenting
@doctrinebot commented on GitHub (Aug 29, 2014):
Comment created by @deeky666:
Commenting tables is a vendor specific feature and therefore not all database vendors support it. I think currently it is only possible to comment tables via mapping for MySQL. The mapping you provided for commenting tables should work however. See here: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php#L247-L249
I'm not quite sure what you mean by commenting relations. Where would you expect Doctrine to add a comment to?
@doctrinebot commented on GitHub (Aug 29, 2014):
Comment created by Kilrogg:
I mean commenting a column that is a foreign key. Like 'project' column above that is a link to Files table and entity.
@doctrinebot commented on GitHub (Sep 1, 2014):
Comment created by @deeky666:
Unfortunately commenting columns part of an association mapping is not possible in ORM at the moment.
@doctrinebot commented on GitHub (Dec 9, 2014):
Comment created by maketime:
I tried doing this with annotations by adding a column annotation to the relation, but this effectively removed the relation alltogether. So no workaround yet.
@doctrinebot commented on GitHub (Dec 12, 2014):
Comment created by @deeky666:
Commenting foreign key columns is simply not supported yet via ORM mapping.
@Majkl578 commented on GitHub (Dec 19, 2017):
YAML is going to be removed in Doctrine 3.0.