php - Jms serializer @JMS\Inline() annotation overrides an actual id -
i have product , product_detail tables in database.

every product has product detail.
class product { /** * @var productdetail * @jms\readonly() * @orm\onetoone(targetentity="apibundle\entity\productdetail", mappedby="product", cascade={"persist"}) * @jms\inline() */ private $detail; } i use @jms\inline() annotation show detail information of product_detail table. when serialize product wrong id. must product id id returns product detail id. bug or doing wrong?
you should not expose id detail when using inline.
source: https://github.com/schmittjoh/jmsserializerbundle/issues/460#issuecomment-113440743
Comments
Post a Comment