Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccessorOrder is ignored #488

Closed
fedebalderas opened this issue Sep 30, 2015 · 3 comments
Closed

AccessorOrder is ignored #488

fedebalderas opened this issue Sep 30, 2015 · 3 comments

Comments

@fedebalderas
Copy link

I got a problem ordering serialized output order of my fields.
This is my code
`
/**

  • @Orm\Entity(repositoryClass="AppBundle\Entity\CustomerRepository")
  • @ExclusionPolicy("all")
  • @AccessorOrder("custom", custom = {"custom_id", "company_name", "first_name", "last_name", "email", "phone_number", "line1", "line2", "line3", "city", "state", "postal_code", "country_code", "created_at"})
    */
    class Customer
    ....
    ....
    `

And the response is the same, like if AccessorOrder was ignored.
{ "id": "edf007d651855ab64f9c", "state": "Guanajuato", "created_at": "2015-09-17T12:42:21-0500", "company_name": "Foograde", "line1": "Gral. Ortega #223D", "first_name": "Federico", "city": "Celaya", "postal_code": "38010", "last_name": "Mata", "email": "[email protected]", "country_code": "MX", "line2": "Col. Alameda" }
`

Any idea?

@hacfi
Copy link

hacfi commented May 24, 2016

@fedebalderas just had the same issue..use your property names like customId, companyName etc. and it should work.

@eugene-matvejev
Copy link

@goetas
Copy link
Collaborator

goetas commented Apr 2, 2017

@fedebalderas just had the same issue..use your property names like customId, companyName etc. and it should work.

@goetas goetas closed this as completed Apr 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants