S
S
symnoob2020-11-23 22:25:19
symfony
symnoob, 2020-11-23 22:25:19

Symfony, is there a way to detect if a Relation is being used?

Hello everyone, unfortunately I did not know how to describe the task in the heading.

I have several tables such as for example: vat (value added tax, etc.), they have relation to other tables.
I need to write an api where the VAT sheet is issued:

[
    {
        "id":1,
        "tax":20,
        "deletable": true
    }
]


If VAT was linked somewhere, for example, to goods, services, etc... Then it should be issued ("deletable": false):

[
    {
        "id":1,
        "tax":20,
        "deletable": false
    }
]


are there any ideas how to fix this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question