Category: entity

Symfony 4 Doctrine 2 findby dosent apply Join and custom join doesn’t work

i’m relatively new with Symfony 4 and Doctrine ORM. I’m trying to get all comments posted from one user when browsing this user profile page. Here’s my comment entity <?php namespace AppEntity; use DoctrineORMMapping as ORM; /** * @ORMEntity(repositoryClass=”AppRepositoryCommentsRepository”) */…

How can I connect my entity field to the same entity?

I added to my entity “Category” a field “parentcategory” to be able to connect a category to another category: class Category { /** * @ORMId() * @ORMGeneratedValue() * @ORMColumn(type=”integer”) */ private $id; /** * @ORMManyToOne(targetEntity=”Category”) * @ORMJoinColumn(name=”parentcategory”, referencedColumnName=”id”) * */…

Symfony CreateFormBuilder ignores my Entity @AssertLength

I have an entity User, which has $password with @AssertLength(min=6) /** * @var string The hashed password * @ORMColumn(type=”string”) * @AssertLength( min=6, minMessage=”Password is too short (min 6 symbols)” ) */ private $password; I’m trying to generate a Login form…