File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -225,14 +225,19 @@ private function getRelationCollectionProperty(string $type): string
225225 $ matches = [];
226226
227227 $ regex = array (
228- '/targetEntity="([a-zA-Z]+)"/i ' => '' ,
229- '/targetEntity="([a-zA-Z]+) \\\\([a-zA-Z]+) \\\\([a-zA-Z]+)"/i ' => '' ,
230- '/targetEntity="([a-zA-Z]+)"/i ' => '[] ' ,
228+ '/targetEntity="([a-zA-Z]+)"/i ' ,
229+ '/targetEntity="([a-zA-Z]+) \\\\([a-zA-Z]+) \\\\([a-zA-Z]+)"/i ' ,
231230 );
232231
233- foreach ($ regex as $ reg => $ val ) {
232+ foreach ($ regex as $ reg ) {
234233 if (preg_match ($ reg , $ type , $ matches )) {
235- $ result = end ($ matches ) . $ val ;
234+
235+ $ collection = '[] ' ;
236+ if (strpos ($ type , 'OneToOne ' ) !== false ) {
237+ $ collection = '' ;
238+ }
239+
240+ $ result = end ($ matches ) . $ collection ;
236241 break ;
237242 }
238243 }
You can’t perform that action at this time.
0 commit comments