M
M
merinovkv2016-09-23 11:23:44
symfony
merinovkv, 2016-09-23 11:23:44

How to use the same table in different methods of Symfony 2, so as not to get errors when generating new tables from an entity?

Hello!
I apologize right away - I just started to get acquainted with Symfony, do not throw slippers.
I'm trying to generate tables from entities like this:
app/console doctrine:schema:create
and I get this error:

[Doctrine\DBAL\Schema\SchemaException]
The table with name 'db00.s_task_activities' already exists.

Such a table does exist, but it is used in two different methods. One is a full-fledged CRUD that both writes and reads from s_task_activities. The second one simply takes data from s_task_activities, it doesn't even have setters to write something there.
Actually, the question is, is it possible to read from the table by the second method through ORM, so that when generating tables, such jambs do not come out?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shagguboy, 2016-09-23
@shagguboy

it is not right. presence/absence of setters for entity does not change anything. writes to the database ONLY ORM and ONLY when he was told to first persist the entity and then flush it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question