我有我想有兩個Hatoas鏈接和自定義序列化的實體客戶symfony的HATEOAS和JMS系列化
/**
* Customer ORM Entity
*
* @package AppBundle\Entity
*
* @Hateoas\Relation("self", href = @Hateoas\Route("get_customers", parameters = { "customer" = "expr(object.getId())" }))
* @Hateoas\Relation("customers", href = @Hateoas\Route("cget_customers"))))
*/
這是對HATEOAS的註釋鏈接
AppBundle\Entity\Customer:
exclusion_policy: ALL
virtual_properties:
getFullName:
serialized_name: full_name
type: string
這是我的YAML配置爲jms序列化,但由於某種原因它也刪除了討厭的鏈接。
我怎樣才能找回來?告訴序列化程序不要刪除_links屬性?