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 9014905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:37:28+00:00 2026-06-16T03:37:28+00:00

I know how to limit fields when dealing with a collection, but what I’m

  • 0

I know how to limit fields when dealing with a collection, but what I’m wondering is if I can limit the selected fields when using getModel()->load($id).

My thought process is if I know the ID I use:

Mage::getModel('model')->load($id)

as opposed to:

Mage::getModel('model')->getCollection()->addFieldToFilter('id', $id)->getFirstItem();

The issue is load($id) returns everything. I know I can use addFieldToSelect on the collection. Is there an equivalent when using load()? When I google this I get the collection method.

Thanks,
GG

EDIT:
I just want to add that if the collection way is how it’s done than that’s fine. I just want to make sure it can’t be done using load().

  • 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-16T03:37:29+00:00Added an answer on June 16, 2026 at 3:37 am

    No, there is no alternative to use the collection except for rewriting the model code altogether which is probably not what you want to do.
    The model load call can only be used to load a full entry – what you can specify is the attribute which to use for the load. For example:

    Mage::getModel('catalog/product')->load($sku,'sku')
    

    will load a product by its sku.

    In fact the model load itself simply defers to it’s resource by doing:

    $this->_getResource()->load($this, $id, $field);
    

    But the resource load method does also not provide the ability to filter for specific attributes, so you will always load the full pack or use the collection.

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

Sidebar

Related Questions

Does anyone know if the LIMIT and OFFSET clause work when using the UPDATE
Bit of a bizarre question, but does anyone know the actual limit to the
I know there isn't any limit for a VARCHAR column, and it can be
Possible Duplicate: new limit within php: 1000 fields per POST. Does someone know, if
Does anyone know the query limit for this undocumented/unofficial google api?
Does anyone know if there is a limit to the number of applications I
i need to know if exist a jquery's plugin to limit the number of
As some of you may know, use of the LIMIT keyword in MySQL does
I'm trying to change the size limit of an upload. I know I have
Something like: SELECT MONTH(*date?*) FROM //Not sure what goes here LIMIT 0,6 I know

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.