L
L
Lucifer Morningstar2016-04-20 00:45:20
symfony
Lucifer Morningstar, 2016-04-20 00:45:20

Symfony communication between Entity?

I couldn't figure it out from the documentation.
There are two entities (blog posts and users).
Blog posts have an author (ineger) field equal to the id from the users table.
How can I link these two tables so that I can get the username from the "users" table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
YaRobot, 2016-04-20
@biowolf_ru

Well, firstly, when generating the communication model, they should have been created automatically.
Unless, of course, you have a database that is not a curve and there are connections.
docs.doctrine-project.org/en/latest/reference/basi...
doctrine-orm.readthedocs.org/projects/doctrine-orm...
Or use search - symfony many to one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question