<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Magento Expert</title>
	<atom:link href="https://www.the-mage-expert.com/tag/model/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.the-mage-expert.com</link>
	<description>Your Magento Commerce Expert</description>
	<lastBuildDate>Tue, 24 Jan 2023 09:37:24 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.6</generator>
	<item>
		<title>Loading  a model without using IDs</title>
		<link>https://www.the-mage-expert.com/686/magento-loading-model-without-ids/</link>
		<comments>https://www.the-mage-expert.com/686/magento-loading-model-without-ids/#comments</comments>
		<pubDate>Thu, 09 Oct 2014 08:09:29 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=686</guid>
		<description><![CDATA[Sometimes there is no id available for loading a model. If thats the case, the following code might help out. It loads a collection by an attribute like name or sku. [crayon-6a7adb8de0614/] Afterwards, it is possible to iterate over the&#8230;]]></description>
				<content:encoded><![CDATA[<p>Sometimes there is no id available for loading a model. If thats the case, the following code might help out. It loads a collection by an attribute like name or sku.</p>
<p></p><pre class="crayon-plain-tag">$collectionData = Mage::getModel('modelname')-&gt;getCollection()-&gt;addFieldToFilter('attribute', 'attribute value');</pre><p></p>
<p>Afterwards, it is possible to iterate over the collection, get the id and load the model using that id.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/686/magento-loading-model-without-ids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
