我将参数设置为数组,如http://jmsyst.com/libs/serializer/master/reference/annotations中所述classQuestionAnswer{/***@JMS\Type("ArrayCollection")*@Groups({"QuestionAnswer"})*/public$question_options_array;}并在另一个类中定义一些选项classQuestionOptions{/***@JMS\Type("integer")*@Groups({"get_option"})*/public$question_option_
我将参数设置为数组,如http://jmsyst.com/libs/serializer/master/reference/annotations中所述classQuestionAnswer{/***@JMS\Type("ArrayCollection")*@Groups({"QuestionAnswer"})*/public$question_options_array;}并在另一个类中定义一些选项classQuestionOptions{/***@JMS\Type("integer")*@Groups({"get_option"})*/public$question_option_