R
R
ruslanyugov2021-02-09 17:04:25
symfony
ruslanyugov, 2021-02-09 17:04:25

How to set the bool field of the doctrine entity if it is a string in the database?

Hello!
I use symfony and doctrine.
There is a table in the database, you need to write an entity under it.
But in the table, the record activity is stored in string 1
Example: active: "Y" = true, "N" = false

In the code, I want to use it as a bool.
How to implement it?

Thank you!

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