Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- concert_id stays empty:
- $c = new \Entities\Concert();
- $pic = new \Entities\Picture();
- $pic->url = $img_url;
- $pic->text = $img_name;
- $pic->name = "$img_name.$img_suff";
- $c->pictures->add($pic);
- $this->em->persist($c);
- $this->em->flush();
- However, this works:
- $pic = new \Entities\Picture();
- $pic->concert = $c;
- $pic->url = $img_url;
- $pic->text = $img_name;
- $pic->name = "$img_name.$img_suff";
- $this->em->persist($pic);
- $this->em->flush();
Add Comment
Please, Sign In to add comment