<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Комментарии на: Kohana для чайников. Простейший ORM</title>
	<atom:link href="http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/</link>
	<description>Гуляю по интернету и пинаю камушки ..</description>
	<lastBuildDate>Tue, 07 Feb 2012 09:46:33 +0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>От: BASSON</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-4077</link>
		<dc:creator>BASSON</dc:creator>
		<pubDate>Thu, 19 May 2011 06:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-4077</guid>
		<description>Еще вопрос у тойже таблицы articles есть связь с таблицей tags многим ко многим. В представляение я передаю данные так: 
        $posts = ORM::factory(&#039;post&#039;)-&gt;find_all(10);
        $this-&gt;template-&gt;content = View::factory(&#039;pages/posts&#039;, array(&#039;posts&#039;=&gt;$posts)); 
А в самом представлении обрабатываю так: 
foreach($posts as $post){
 echo $post-&gt;title;
 ....
 foreach($post-&gt;tags-&gt;find_all() as $tag){
 echo $tag-&gt;value.&#039; &quot;;
}
}
Появляется соответсвенно вопрос а правильно ли что в представлении идет работа с данными? тоесть $post-&gt;tags-&gt;find_all() ??
А еще можно  Джаббер или еще какойни будь видь связи с тем кто разобрался..  Просто возникают мелкие недопонимания и хочется знать как сделать правильнее!</description>
		<content:encoded><![CDATA[<span id="co_4077"><p>Еще вопрос у тойже таблицы articles есть связь с таблицей tags многим ко многим. В представляение я передаю данные так:<br />
        $posts = ORM::factory(&#8217;post&#8217;)-&gt;find_all(10);<br />
        $this-&gt;template-&gt;content = View::factory(&#8217;pages/posts&#8217;, array(&#8217;posts&#8217;=&gt;$posts));<br />
А в самом представлении обрабатываю так:<br />
foreach($posts as $post){<br />
 echo $post-&gt;title;<br />
 &#8230;.<br />
 foreach($post-&gt;tags-&gt;find_all() as $tag){<br />
 echo $tag-&gt;value.&#8217; &#8220;;<br />
}<br />
}<br />
Появляется соответсвенно вопрос а правильно ли что в представлении идет работа с данными? тоесть $post-&gt;tags-&gt;find_all() ??<br />
А еще можно  Джаббер или еще какойни будь видь связи с тем кто разобрался..  Просто возникают мелкие недопонимания и хочется знать как сделать правильнее!</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('4077','BASSON'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('4077','BASSON'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: altesack</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-4075</link>
		<dc:creator>altesack</dc:creator>
		<pubDate>Wed, 18 May 2011 20:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-4075</guid>
		<description>Ну примерно так, да. Кстати можно и не выносить в контроллер. Можно тот же метод создать в модели. Я в последнее время так стараюсь делать.</description>
		<content:encoded><![CDATA[<span id="co_4075"><p>Ну примерно так, да. Кстати можно и не выносить в контроллер. Можно тот же метод создать в модели. Я в последнее время так стараюсь делать.</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('4075','altesack'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('4075','altesack'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: BASSON</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-4072</link>
		<dc:creator>BASSON</dc:creator>
		<pubDate>Wed, 18 May 2011 18:27:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-4072</guid>
		<description>Тоесть получается что создав модель наследуя класс ORM мы все действия по записи данных и выдергиванию переносим в контроллер? Тоесть например добавление статьи в базу происходит так?
class Sitemap_Controller extends Controller{
 
    public function action_add(){
        header(&quot;Content-Type: text/xml;charset=utf8&quot;);
 
        $articles = ORM::factory(&#039;article&#039;);
        $articles-&gt;title = &quot;dsdsd&quot;;
        $articles-&gt;text = &quot;dsdsd&quot;;
        $articles-&gt;save();
        ..........................
    }
}
Так?</description>
		<content:encoded><![CDATA[<span id="co_4072"><p>Тоесть получается что создав модель наследуя класс ORM мы все действия по записи данных и выдергиванию переносим в контроллер? Тоесть например добавление статьи в базу происходит так?<br />
class Sitemap_Controller extends Controller{</p>
<p>    public function action_add(){<br />
        header(&#8221;Content-Type: text/xml;charset=utf8&#8243;);</p>
<p>        $articles = ORM::factory(&#8217;article&#8217;);<br />
        $articles-&gt;title = &#8220;dsdsd&#8221;;<br />
        $articles-&gt;text = &#8220;dsdsd&#8221;;<br />
        $articles-&gt;save();<br />
        &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
    }<br />
}<br />
Так?</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('4072','BASSON'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('4072','BASSON'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: altesack</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-3938</link>
		<dc:creator>altesack</dc:creator>
		<pubDate>Tue, 19 Apr 2011 08:32:54 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-3938</guid>
		<description>&lt;blockquote&gt;интересно чем же вас не устраивает кейк&lt;/blockquote&gt;
Всмысле &quot;не устраивает&quot;?? Почему на нём не пишу?  Потому, что не знаю =)
Когда-то, когда принимал решение, за какой фреймворк садиться, кейк по сравнительным отзывам  показался мне более трудным и старым (устаревшим).
Это было сугубо субъективное ощущение.</description>
		<content:encoded><![CDATA[<span id="co_3938"><blockquote><p>интересно чем же вас не устраивает кейк</p></blockquote>
<p>Всмысле &#8220;не устраивает&#8221;?? Почему на нём не пишу?  Потому, что не знаю =)<br />
Когда-то, когда принимал решение, за какой фреймворк садиться, кейк по сравнительным отзывам  показался мне более трудным и старым (устаревшим).<br />
Это было сугубо субъективное ощущение.</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('3938','altesack'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('3938','altesack'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: Николай</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-3937</link>
		<dc:creator>Николай</dc:creator>
		<pubDate>Tue, 19 Apr 2011 08:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-3937</guid>
		<description>&lt;b&gt;Alex&lt;/b&gt; пишет:
&lt;blockquote&gt;еще как жив!
&lt;/blockquote&gt;

интересно чем же вас не устраивает кейк</description>
		<content:encoded><![CDATA[<span id="co_3937"><p><b>Alex</b> пишет:</p>
<blockquote><p>еще как жив!
</p></blockquote>
<p>интересно чем же вас не устраивает кейк</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('3937','Николай'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('3937','Николай'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: Alex</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-3681</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 02 Feb 2011 21:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-3681</guid>
		<description>еще как жив!</description>
		<content:encoded><![CDATA[<span id="co_3681"><p>еще как жив!</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('3681','Alex'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('3681','Alex'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: altesack</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-3645</link>
		<dc:creator>altesack</dc:creator>
		<pubDate>Sun, 23 Jan 2011 13:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-3645</guid>
		<description>&lt;b&gt;@ Alex&lt;/b&gt;:
А кейк ещё жив?</description>
		<content:encoded><![CDATA[<span id="co_3645"><p><b>@ Alex</b>:<br />
А кейк ещё жив?</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('3645','altesack'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('3645','altesack'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: Alex</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-3644</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 23 Jan 2011 10:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-3644</guid>
		<description>блин, как же трубно переходить с CakeHP на кохану или кодожжотер. Всё как-то недо... приходится писать то,что кейк за меня делал.</description>
		<content:encoded><![CDATA[<span id="co_3644"><p>блин, как же трубно переходить с CakeHP на кохану или кодожжотер. Всё как-то недо&#8230; приходится писать то,что кейк за меня делал.</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('3644','Alex'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('3644','Alex'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: Евгений</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-3033</link>
		<dc:creator>Евгений</dc:creator>
		<pubDate>Mon, 05 Jul 2010 20:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-3033</guid>
		<description>Class Controller_Welcome extends Controller_Template
{
    public $template = &#039;welcome&#039;;
    
    function action_index()
    {
        $this-&gt;request-&gt;headers[&#039;content-type&#039;] = &#039;text/xml;charset=utf8&#039;;
 
        $articles = ORM::factory(&#039;article&#039;);
        $this-&gt;template-&gt;articles = $articles-&gt;find_all();
    }
}

&lt;?php echo&#039;&#039;?&gt;

 

                
                id; ?&gt;
                monthly
                0.8
                

 
</description>
		<content:encoded><![CDATA[<span id="co_3033"><p>Class Controller_Welcome extends Controller_Template<br />
{<br />
    public $template = &#8216;welcome&#8217;;</p>
<p>    function action_index()<br />
    {<br />
        $this-&gt;request-&gt;headers['content-type'] = &#8216;text/xml;charset=utf8&#8242;;</p>
<p>        $articles = ORM::factory(&#8217;article&#8217;);<br />
        $this-&gt;template-&gt;articles = $articles-&gt;find_all();<br />
    }<br />
}</p>
<p>&lt;?php echo&#039;&#8217;?&gt;</p>
<p>                id; ?&gt;<br />
                monthly<br />
                0.8</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('3033','Евгений'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('3033','Евгений'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
	<item>
		<title>От: Altesack</title>
		<link>http://blogocms.ru/2010/01/kohana-dlya-chajnikov-prostejshij-orm/comment-page-1/#comment-2349</link>
		<dc:creator>Altesack</dc:creator>
		<pubDate>Wed, 24 Feb 2010 04:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogocms.ru/?p=1172#comment-2349</guid>
		<description>&lt;b&gt;@ Евгений&lt;/b&gt;:
mycontroller - имеется в виду название Вашего контроллера, который должен быть в ссылке на сайтмапе.</description>
		<content:encoded><![CDATA[<span id="co_2349"><p><b>@ Евгений</b>:<br />
mycontroller &#8211; имеется в виду название Вашего контроллера, который должен быть в ссылке на сайтмапе.</p>
</span><div class="comment-toolbar" style="text-align: right"><a href="#comment" onclick="CF_Reply('2349','Altesack'); return false;">Ответить</a>  |  <a href="#comment" onclick="CF_Quote('2349','Altesack'); return false;">С цитатой</a></div>]]></content:encoded>
	</item>
</channel>
</rss>

