Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7065487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:57:44+00:00 2026-05-28T04:57:44+00:00

I am processing a submitted Zend Form which updates a Doctrine Record using the

  • 0

I am processing a submitted Zend Form which updates a Doctrine Record using the following code, where $query is a query built using a doctrine query builder:

$record_array = $query->getResult();
$this->_record = $record_array[0];
if($this->getRequest()->isPost())
    {
        if ($this->_form->isValid($this->_request->getPost()))
        {
            $newEntity = $this->_form->update($this->_record);
            $this->_em->flush(); 
            $this->view->success = 'Record Saved.';
        } else {
            $this->view->errors = $this->_form->getErrors();
        }        
    }

The above works fine if there are no integers in the record, i.e. only strings. However, I get the error above if I include fields on the form which are mapped as integers in the doctrine entity.

Any help would be appreciated.

UPDATE:

/**
 * @var integer $solicitorid
 *
 * @Column(name="SolicitorID", type="integer", nullable=false)
 * @Id
 * @GeneratedValue(strategy="IDENTITY")
 */
private $solicitorid;

/**
 * @var string $solicitor
 *
 * @Column(name="Solicitor", type="string", length=160, nullable=true)
 */
private $solicitor;

/**
 * @var string $address
 *
 * @Column(name="Address", type="string", length=160, nullable=true)
 */
private $address;

/**
 * @var string $town
 *
 * @Column(name="Town", type="string", length=100, nullable=true)
 */
private $town;

/**
 * @var string $county
 *
 * @Column(name="County", type="string", length=100, nullable=true)
 */
private $county;

/**
 * @var string $postcode
 *
 * @Column(name="Postcode", type="string", length=100, nullable=true)
 */
private $postcode;

/**
 * @var string $dxaddress
 *
 * @Column(name="DXAddress", type="string", length=150, nullable=true)
 */
private $dxaddress;

/**
 * @var string $phone
 *
 * @Column(name="phone", type="string", length=30, nullable=true)
 */
private $phone;

/**
 * @var string $fax
 *
 * @Column(name="fax", type="string", length=30, nullable=true)
 */
private $fax;

/**
 * @var string $email
 *
 * @Column(name="email", type="string", length=255, nullable=true)
 */
private $email;

/**
 * @var string $password
 *
 * @Column(name="password", type="string", length=30, nullable=false)
 */
private $password;

/**
 * @var integer $leadStatus
 *
 * @Column(name="lead_status", type="integer", nullable=true)
 */
private $leadStatus;

/**
 * @var string $termsref
 *
 * @Column(name="termsRef", type="string", length=10, nullable=true)
 */
private $termsref;

/**
 * @var integer $termsconditions
 *
 * @Column(name="termsconditions", type="integer", nullable=true)
 */
private $termsconditions;

/**
 * @var date $termssent
 *
 * @Column(name="termsSent", type="date", nullable=true)
 */
private $termssent;

/**
 * @var date $termssigneddate
 *
 * @Column(name="termssigneddate", type="date", nullable=true)
 */
private $termssigneddate;

/**
 * @var integer $paymentterms
 *
 * @Column(name="paymentterms", type="integer", nullable=true)
 */
private $paymentterms;

/**
 * @var integer $discountterms
 *
 * @Column(name="discountterms", type="integer", nullable=true)
 */
private $discountterms;

/**
 * @var float $discountrate
 *
 * @Column(name="discountrate", type="float", nullable=true)
 */
private $discountrate;

/**
 * @var integer $accountscontact
 *
 * @Column(name="AccountsContact", type="integer", nullable=true)
 */
private $accountscontact;

/**
 * @var date $warned
 *
 * @Column(name="warned", type="date", nullable=true)
 */
private $warned;

/**
 * @var float $feerate
 *
 * @Column(name="FeeRate", type="float", nullable=true)
 */
private $feerate;

/**
 * @var string $labourrate
 *
 * @Column(name="LabourRate", type="string", length=100, nullable=true)
 */
private $labourrate;

/**
 * @var text $specialinst
 *
 * @Column(name="SpecialInst", type="text", nullable=true)
 */
private $specialinst;

/**
 * @var text $reportinst
 *
 * @Column(name="ReportInst", type="text", nullable=true)
 */
private $reportinst;

/**
 * @var boolean $autostatement
 *
 * @Column(name="AutoStatement", type="boolean", nullable=true)
 */
private $autostatement;

/**
 * @var datetime $lastmodifed
 *
 * @Column(name="lastModifed", type="datetime", nullable=false)
 */
private $lastmodifed;

Above is the entity.
The issue comes when I try to update an integer field.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:57:44+00:00Added an answer on May 28, 2026 at 4:57 am

    are you using MySQL? this can happen because MySQL is running in strict mode.
    run these queries from phpMyAdmin or whatever db administrator you are using to check if the database is in strict mode:

    SELECT @@GLOBAL.sql_mode;
    SELECT @@SESSION.sql_mode;
    

    if it returns something containing STRICT_TRANS_TABLES you could try and run:

    SET @@global.sql_mode= 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am processing a form and in turn, receiving a response code based on
I'm using the FAPI for building and processing a form, and I successfully created
I have a form where spanish can be submitted and using PHP, I send
Lets suppose i have the following array submitted by a html form: array( 'firstname'
I am having an issue when processing form data. When the form is submitted,
I have a form page in which either an INSERT or an UPDATE query
I am currently using a email form, which posts some text once the email
After processing form from POST I should redirect, to prevent user from hitting back.
I am passing values from a form to a processing page. There are more
I'm working with a long form/survey in extjs which calls a script which then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.