Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:56:39+00:00 2026-05-27T06:56:39+00:00

When I have my DQL query from a table in my database and return

  • 0

When I have my DQL query from a table in my database and return var_dump() for example the ID of the row it’ll be type of string, despite the fact it is an unsigned INT(10) in the DB, which is very annoying when I want to echo json_encode($row->toArray());. Every integer will be wrapped in quotation marks.

How can I instruct Doctrine to cast types properly and not leave them “as is” like described here: http://www.doctrine-project.org/jira/browse/DC-769

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:56:40+00:00Added an answer on May 27, 2026 at 6:56 am

    I found out that the Doctrine version I was actually using (v1.2.8 installed via APT) was too old to handle this feature. When I updated to Doctrine 2 my described problem was solved.

    You should consider an update if you have the same issue, but be aware of the changes that were made from Doctrine1 to Doctrine2! Migration could take some time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following DQL (Doctrine1.2): $dql->select('sum(t.column1) column1, t.column2') ->from('Table t') ->groupBy('t.column2') ->orderBy('column1'); But the
I have written a DQL query in Doctrine 2: $qb->select('r.position') ->from('\Entities\Races', 'r') ->where($qb->expr()->eq('r.entrantId', ':entrant_id'))
I have a multilingual database(inspired from here, the 3rd option .) My database schema
Have you refactored from an ActiveRecord to a DataMapper pattern? What conditions prompted the
I'm confused about how DQL works, and really need some help here. I have
I have a join-table which is created by using @ORM\ManyToMany annotation in Symfony2/Doctrine. It
Have converted devise new session from erb to Haml but doens't work, this is
Have searched the database but need to specifically sum(of hours flown or days off)in
So I'm attempting to do a query on a table that holds two foreign
I have a doctrine query that returns blog posts and their comments: SELECT b,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.