Mass update - Bad server resopuns [error]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adrianalin
    Member
    • Sep 2017
    • 48

    Mass update - Bad server resopuns [error]

    Hello,


    Can anibody help my undestend what the error meens:


    [2017-12-06 06:45:04] Espo.ERROR: API [PUT]:/:controller/action/:action, Params:Array ( [controller] => Restante [action] => massUpdate ) , InputData: {"attributes":{"description":"g"},"ids":["5a141b60180aab686"],"where":null,"selectData":null,"byWhere":false } - SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `modified_by_id` = '1' WHERE restante.id = '5a141b60180aab686' AND restante.del' at line 1 [] []
    [2017-12-06 06:45:04] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `modified_by_id` = '1' WHERE restante.id = '5a141b60180aab686' AND restante.del' at line 1, Code: 42000 URL: /api/v1/Restante/action/massUpdate [] []



    if i mache a new entity it's ok but i have a old entity whit relations to other entitysand it's a lot of data.....

    it dosent mather what tipe of var i what to change varchar, text, bool or date i alweis ge the seim error.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    Check your entityDefs in custom folder. It's seams you could have problem with relation definition

    Comment

    • adrianalin
      Member
      • Sep 2017
      • 48

      #3
      "com": {
      "notNull": true,
      "type": "bool",
      "default": false,
      "audited": false,
      "readOnly": false,
      "tooltip": false,
      "isCustom": true
      },


      this is the check box i whant to mass update

      and the relation definiton i anve 2 realation whit case 1 is mani to mani and other is one to mani..... i will remove the mani to mani later but for now this is what i have

      "fields": {
      "cases": {
      "type": "linkMultiple",
      "layoutDetailDisabled": false,
      "layoutListDisabled": true,
      "layoutMassUpdateDisabled": false,
      "importDisabled": false,
      "noLoad": false,
      "isCustom": true,
      "readOnly": true,
      "required": false,
      "tooltip": false
      },

      "case": {
      "type": "link",
      "required": false,
      "audited": false,
      "readOnly": false,
      "tooltip": false
      },

      },
      "links": {
      "cases": {
      "type": "hasMany",
      "relationName": "caseRestante",
      "foreign": "restante",
      "entity": "Case",
      "audited": true,
      "isCustom": true
      },

      "case": {
      "type": "belongsTo",
      "foreign": "restantes",
      "entity": "Case",
      "audited": false,
      "isCustom": true
      }
      },

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        this json is not valid
        https://jsonlint.com/ - you can use this or other service, to check your json

        Comment

        • adrianalin
          Member
          • Sep 2017
          • 48

          #5
          All good. You wher rithe it whas a relationsip problem. One of the relation in json whas 'broken'. i remove it and it's worcks ok now.


          TX !!

          Comment

          Working...