Skip to content

The integer id field is being populated as a string after save #13002

Closed
@ChangePlaces

Description

@ChangePlaces

Expected and Actual Behavior

When I save a model, the id field is automatically populated with the id value, however, instead of it being an integer value, it's populated as a string value. When outputting json this is an issue. In the database, the id field is an integer auto_increment primary key, and in the annotations, the `@Column' type is an integer. (I'm using the annotation strategy)

e.g. instead of seeing: "id":5, I get "id":"5"

Details

  • Phalcon version: (php --ri phalcon) 3.2.1
  • PHP Version: (php -v) 7
  • Operating System:
  • Installation type: Compiling from source
  • Zephir version (if any):
  • Server: Nginx
  • Other related info (Database, table schema):

Metadata

Metadata

Assignees

Labels

enhancementEnhancement to the framework

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions