entityGenerator bugs #4950

Closed
opened 2026-01-22 14:53:57 +01:00 by admin · 2 comments
Owner

Originally created by @poolerMF on GitHub (Dec 20, 2015).

Originally assigned to: @Majkl578 on GitHub.

hello ... I'm trying to make custom ClassMetadataInfo .. and then generate entity

when I map oneToOne or oneToMany, there is automatically added joinColumns in mapping ...

in EntityGenerator, function generateAssociationMappingPropertyDocBlock ->

if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) {
    .... generating @JoinColumns ...
}

generating @JoinColumns should by ONLY in manyToOne or manyToMany association type ...

Originally created by @poolerMF on GitHub (Dec 20, 2015). Originally assigned to: @Majkl578 on GitHub. hello ... I'm trying to make custom ClassMetadataInfo .. and then generate entity when I map oneToOne or oneToMany, there is automatically added joinColumns in mapping ... in EntityGenerator, function generateAssociationMappingPropertyDocBlock -> ``` if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) { .... generating @JoinColumns ... } ``` generating @JoinColumns should by ONLY in manyToOne or manyToMany association type ...
admin added the BugWon't Fix labels 2026-01-22 14:53:57 +01:00
admin closed this issue 2026-01-22 14:53:59 +01:00
Author
Owner

@poolerMF commented on GitHub (Dec 20, 2015):

next bug .. there is missing indexBy (in oneToMany association type)
in EntityGenerator, in function generateAssociationMappingPropertyDocBlock:

there should be:

if (isset($associationMapping['indexBy'])) {
    $typeOptions[] = 'indexBy="' . $associationMapping['indexBy'] . '"';
}
@poolerMF commented on GitHub (Dec 20, 2015): next bug .. there is missing indexBy (in oneToMany association type) in EntityGenerator, in function generateAssociationMappingPropertyDocBlock: there should be: ``` if (isset($associationMapping['indexBy'])) { $typeOptions[] = 'indexBy="' . $associationMapping['indexBy'] . '"'; } ```
Author
Owner

@Majkl578 commented on GitHub (Dec 20, 2017):

EntityGenerator is going to be removed in Doctrine 3.0, sorry for no response and thanks for reporting.

@Majkl578 commented on GitHub (Dec 20, 2017): EntityGenerator is going to be removed in Doctrine 3.0, sorry for no response and thanks for reporting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4950