php - Jms serializer @JMS\Inline() annotation overrides an actual id -


i have product , product_detail tables in database.

enter image description here

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

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -