删除验证约束子Symfony2

时间:2015-10-16 17:48:03

标签: symfony

我使用FosCommentbundle,我有超载“评论”实体来添加一些属性。

var app = angular.module('app', []);
app.factory('DataService', function($http, $q) {
return {
getData: function() {
  return $http.get('http://ergast.com/api/f1/2013/driverStandings.json')
    .then(function(response) {
      if (typeof response.data == 'object') {
        return response.data;
      } else {
        return $q.reject(response.data);
      }
    }, function(response) {
      return $q.reject(response.data);
    })
  }
 }
});

app.controller('MainCtrl', function($scope, DataService) {
$scope.driversList = [];
var makePromise = function() {
DataService.getData()
  .then(function(data) {
    //console.log(data.MRData.StandingsTable.StandingsLists[0].DriverStandings)
    $scope.driversList = data.MRData.StandingsTable.StandingsLists[0].DriverStandings;
  }, function(error) {
    console.log('error')
  })
}
//THIS IS MY CONCERN HERE...
makePromise();
})

现在我想删除供应商中存在的Body NotBlank的验证约束到resources / config / validation.xml

class Comment extends BaseComment implements SignedCommentInterface
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    ...

    protected $newProperty;


}

因为Comment是baseComment的子代,我不知道如何删除此约束

0 个答案:

没有答案
相关问题