B
B
BonBon Slick2017-11-25 16:08:49
symfony
BonBon Slick, 2017-11-25 16:08:49

Optimal way to map Entity parameters?

What is the best way to advertise and in what cases?

/**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

# src/Resources/config/doctrine/Product.orm.yml
App\Entity\Product:
    type: entity
    table: product
    id:
        id:
            type: integer


<!-- src/Resources/config/doctrine/Product.orm.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Flasher, 2017-11-25
@BonBonSlick

First option. It's the one that's easier to use. This one is more preferred among developers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question