Doctrine Project

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Doctrine 2 - ORM
  • Doctrine 2 - ORM
  • DDC-2087

Select colum Hydration

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Simple way to select colum
for example I want select id's of entity's to save in cache or in other select query
Or i vant select one distinct field.

SELECT u.id FROM User as u

getResult give

array(
0=>array('id' => 1),
1=>array('id' => 2),
)

but how can take this

array(
0=> 1,
0=> 2,
)

Activity

  • All
  • Comments
  • History
  • Activity
  • Source
Hide
Permalink
Ivan Borzenkov added a comment - 18/Oct/12 9:55 AM - edited

for example

http://stackoverflow.com/questions/11327798/change-the-getresult-array-key-for-the-primary-key-value

this code would be good add in library
(and array key maybe too )

Show
Ivan Borzenkov added a comment - 18/Oct/12 9:55 AM - edited for example http://stackoverflow.com/questions/11327798/change-the-getresult-array-key-for-the-primary-key-value this code would be good add in library (and array key maybe too )

People

  • Assignee:
    Benjamin Eberlei
    Reporter:
    Ivan Borzenkov
Vote (0)
Watch (1)

Dates

  • Created:
    18/Oct/12 9:47 AM
    Updated:
    18/Oct/12 9:56 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Doctrine Project. Try JIRA - bug tracking software for your team.