Doctrine 更新我的数据库并放弃表中的元素

Doctrine 更新我的数据库并放弃表中的元素,doctrine,Doctrine,我想从数据库中删除一个项目并将其从表中删除 实体产品 我想选择所有的产品,在点击按钮x后,我想让它更新名称并将其从表中删除 有什么帮助吗?? 我的树枝: <script> $("document").ready(function () { $(".btn-group-vertical").click(function () { $.ajax({ type:'get',

我想从数据库中删除一个项目并将其从表中删除 实体产品 我想选择所有的产品,在点击按钮x后,我想让它更新名称并将其从表中删除 有什么帮助吗?? 我的树枝:

 <script>

    $("document").ready(function () {

        $(".btn-group-vertical").click(function () {

            $.ajax({
               type:'get',
                url:'http://localhost/symfony/nouveau%20dossier/web/app_dev.php/'+$(this).val(),
                beforeSend: function () {

                },
                success: function(data){
                    var x = $("produit").val(data.approuver);
                    console.log(x);
                    $("tt").find('td').fadeOut(1000,function(){
                        $("tt").remove();
                    });

                }



            });



        });





    });


</script>
{% endblock script %}
 {% block body %}
 <section class="content">
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">Produit en attente</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
                <table id="example2" class="table table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>Produit de</th>
                        <th>Libelle Produit</th>
                        <th>Quantite stock</th>
                        <th>etat</th>
                    </tr>
                    </thead>

                    <tbody>
                    {% for product in  products %}
                        <tr class="tt">
                            <td align="center">{{ product.seller }}</td>
                            <td align="center">{{ product.libelle }}</td>
                            <td align="center">{{ product.quantiteStock }}</td>
                            <td><button
                                    type="button"

                                    class="btn btn-group-vertical btn-danger btn-xs"
                                    id=1>Decliner</button>



                            <button type="button"

                                    class="btn btn-group-vertical btn-sucess btn-xs"
                                    id=2>Approuver</button>
                            </td>
                        </tr>
                    {% endfor %}
                    <tfoot>
                    <tr>
                        <th>Produit de</th>
                        <th>Libelle Produit</th>
                        <th>Quantite stock</th>
                        <th>etat</th>
                    </tr>
                    </tfoot>
                </table>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
<!-- ./wrapper -->
需要帮忙吗

我想从数据库中删除一个项,并将其从表实体中删除 产品

要删除产品,请执行以下操作:

$em->remove($produit);
$em->flush();
我想从数据库中删除一个项,并将其从表实体中删除 产品

要删除产品,请执行以下操作:

$em->remove($produit);
$em->flush();

为什么要重命名正在删除的内容?为什么要重命名正在删除的内容?