Details

    • Type: New Feature
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: Titanium SDK & CLI
    • Labels:
    • Environment:

      Mobile

      Description

      The documents state that "Only the owner of the object can update the object."

      How can someone else update an object created by another?

      For example i have created an object like so:

      Cloud.Objects.create({ classname: 'cars', fields:

      { make: 'nissan', color: 'blue', year: 2005 }

      }, function (e) { if (e.success)

      { var car = e.cars[0]; alert('Success:\\n' + 'id: ' + car.id + '\\n' + 'make: ' + car.make + '\\n' + 'color: ' + car.color + '\\n' + 'year: ' + car.year + '\\n' + 'created_at: ' + car.created_at); }

      else

      { alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); }

      });

      We then want another user who is logged into my app to update it like so:
      Cloud.Objects.update({ classname: 'cars', id: savedCar1.id, fields:

      { color: 'purple', mileage: 10000 }

      }, function (e) { if (e.success)

      { var car = e.cars[0]; alert('Success:\\n' + 'id: ' + car.id + '\\n' + 'make: ' + car.make + '\\n' + 'color: ' + car.color + '\\n' + 'year: ' + car.year + '\\n' + 'mileage: ' + car.mileage + '\\n' + 'updated_at: ' + car.updated_at); }

      else

      { alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); }

      });

      Can this be looked at please

        Attachments

          Activity

            People

            • Assignee:
              ragrawal Ritu Agrawal
              Reporter:
              immiejay Imraan Jhetam
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration