With that mapping you can only have one product in a DownloadGroup and many downloadGroups in a Product...
On Thursday, 6 March 2014 09:45:26 UTC+1, Parsifal wrote: > > > in DownloadGroup entity I have this: > $metadata->mapManyToOne(array( 'fieldName' => 'product', > 'targetEntity' => 'Entities\\Product', > 'inversedBy' => 'dlGroups', > 'joinColumns' => array( 0 => array( 'name' > => 'id', > > 'referencedColumnName' => 'download_group', > > 'nullable' => true, > > 'columnDefinition' => NULL, > ), ) > > )); > and in Product entity this: > > $metadata->mapOneToMany(array( 'fieldName' => 'dlGroups', > 'targetEntity' => 'Entities\\DownloadGroup', > 'mappedBy' => 'product', > 'joinColumns' => array( 0 => array( 'name' > => 'download_group', > > 'referencedColumnName' => 'id', > > 'nullable' => true, > > 'columnDefinition' => NULL, > ), ) > )); > > > In DownloadGroup there are only two rows: id, groupName > groupName might be something like: 'Pro', 'Basic' etc. > then assign one or several product to groups as Pro, Basic etc. > May be there is no product as Basic and user might want to delete this > groupName, then I am getting this Notice message. How to avoid it? or am I > doing something wrong? > > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/groups/opt_out.
