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

  • SEARCH
  • Home
  • 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 7813835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:59:49+00:00 2026-06-02T04:59:49+00:00

I have a doctrine2 query like this: $query = $this -> doctrine -> em

  • 0

I have a doctrine2 query like this:

$query = $this -> doctrine -> em -> createQuery ("SELECT a, b FROM ORM\Dynasties2\Maillinks a JOIN a.msgId b");

It returns mixed results, similar to this:

ORM\Dynasties2\Maillinks Object 
( 
    [id:ORM\Dynasties2\Millinks:private] => 1 
    [toUser:ORM\Dynasties2\Maillinks:private] => 16 
    [isRead:ORM\Dynasties2\Maillinks:private] => 0 
    [msgId:ORM\Dynasties2\Maillinks:private] => ORM\Dynasties2\Mailmsgs Object 
    ( 
        [id:ORM\Dynasties2\Mailmsgs:private] => 1 
        [msgText:ORM\Dynasties2\Mailmsgs:private] => asdfasdfasdfasdfasdfasdf 
        [fromUser:ORM\Dynasties2\Mailmsgs:private] => 13 
        [timeStamp:ORM\Dynasties2\Mailmsgs:private] => DateTime Object 
        (       
            [date] => 2012-04-20 12:17:29 
            [timezone_type] => 3 
            [timezone] => America/Los_Angeles 
        ) 
        [onTurn:ORM\Dynasties2\Mailmsgs:private] => 1 
        [importance:ORM\Dynasties2\Mailmsgs:private] => 2 
        [msgType:ORM\Dynasties2\Mailmsgs:private] => 1 
    ) 
)

I can access some of the data, at the ‘top’ easily enough.
echo $row -> getToUser(); returns ’16’

I tried echo $row -> msgId-> getMsgText(); but that returns Fatal error: Cannot access private property ORM\Dynasties2\Maillinks::$msgId

How do I access the data in the objects within?

Or: is my query and result broken? Do I need to do something different with my query or entities?

  • 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-06-02T04:59:51+00:00Added an answer on June 2, 2026 at 4:59 am

    Does this not work for you?

    $row->getMsgId()->getMsgText();
    

    You should be able to check the actual entities files ( whether you had doctrine build them, or someone else did ) to check the getters and setters for that entity.

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

Sidebar

Related Questions

i have a query that returns ~50k rows, seems like doctrine put this whole
I have a doctrine query that returns blog posts and their comments: SELECT b,
I want to have query like this in mysql: select a.x, a.y, a.foo, sum(a.bar)
i have in Symfony 1.4 and Doctrine 1.2 such query: $this->query = Doctrine_Core::getTable('News') ->createQuery('a')->leftJoin('Tag
I have a query that reads like this: $fields = Doctrine_Core::getTable('model_1')->findByColumnId($id); took a var_dump
I have a situation where I want to assemble a Doctrine select query based
i have created this query that works OK: $q1 = Doctrine_Query::create() ->from('Usuario u') ->leftJoin('u.AmigoUsuario
this SQL clause is working OK: SELECT * FROM `sf_guard_user` WHERE nombre_apellidos LIKE REPLACE('Mar
doeas anybody use the Query\Builder from Doctrine as Standalone Tool ? It seems like
I am trying to run this query: $record = Doctrine_Query::create() ->select('m.*') ->from('Modification m') ->leftJoin('m.Location

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.