Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symfony 3.4 + Save method not working #477

Closed
parthiv2585 opened this issue Dec 8, 2017 · 1 comment
Closed

Symfony 3.4 + Save method not working #477

parthiv2585 opened this issue Dec 8, 2017 · 1 comment

Comments

@parthiv2585
Copy link

parthiv2585 commented Dec 8, 2017

Hi All,
I have upgrade Symfony 2.8 To Symfony 3.4.
In Symfony 2.8 save() method is working fine and After up gradation save() mathod not working.
My composer.json

"propel/propel": "2.0.*@dev",
"propel/propel-bundle": "~3.0@dev",

My Save method as below.

$releasennote = new ReleaseNote();       
       $form = $this->createForm(ReleaseNoteType::class, $releasennote);                
       if ('POST' === $request->getMethod()) {             
           $form->handleRequest($request);             
           if ($form->isSubmitted() && $form->isValid())
           {                    
               try
               {   
                   $releasennote->save();                    
                   $this->addFlash("success", "Your modifications have been saved.!");
               }
               catch(\Exception $e)
               {     
                   $this->addFlash('error','Could not save the release note.!'); 
                   return $this->redirectToRoute($request->get('_route'),$request->query->all());
               } 
               return $this->redirect($this->generateUrl('help_releasenote_list'));
           }
           else
           {
                   $this->addFlash('error','Could not save the release note.!'.$form->getErrors());                 
                   return $this->redirectToRoute($request->get('_route'),$request->query->all());
           }
           
       }        
       return $this->render('HelpReleasenoteBundle:Default:new.html.twig', array(
           'form' => $form->createView(),
       ));

ERROR:

Unable to execute INSERT statement [INSERT INTO release_note (release_note_id, release_version, release_note, release_date) VALUES (:p0, :p1, :p2, :p3)]

Please help me fixed issue.

Thanks

@parthiv2585
Copy link
Author

Hi All ,

I have fixed this issue. Issue is char size.

Thanks

@marcj marcj closed this as completed Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants