K
K
Kirill Gorelov2019-09-30 16:34:42
Doctrine ORM
Kirill Gorelov, 2019-09-30 16:34:42

Doctrine does not have a property named "mappedBy"?

Guys, hello.
I don’t understand why such an error(((
All code posted on pastebin
Product: pastebin
Categories: pastebin
I already have all doubts((

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Flying, 2019-09-30
@Kirill-Gorelov

It's very simple: In the code Producton line 123 you use

@ORM\ManyToOne(targetEntity="Category", mappedBy="product")

whereas for ManyToOne it is necessary to use inversedBy, this is explicitly described in the documentation and can be seen in the code of this annotation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question