<?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>Комментарии на: ORM2 на практике</title>
	<atom:link href="http://brotkin.ru/2009/02/06/orm2-na-praktike/feed/" rel="self" type="application/rss+xml" />
	<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/</link>
	<description>ковыряемся в Internet</description>
	<lastBuildDate>Fri, 11 May 2012 06:10:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>От: V3r</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-105</link>
		<dc:creator>V3r</dc:creator>
		<pubDate>Sun, 21 Jun 2009 16:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-105</guid>
		<description>Спасибо! Разобрался.))</description>
		<content:encoded><![CDATA[<p>Спасибо! Разобрался.))</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: BIakaVeron</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-104</link>
		<dc:creator>BIakaVeron</dc:creator>
		<pubDate>Sat, 20 Jun 2009 18:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-104</guid>
		<description>V3r
А текст модели бы еще... Есть подозрение, что вы конструктор изменили, потеряв там параметр $id.</description>
		<content:encoded><![CDATA[<p>V3r<br />
А текст модели бы еще&#8230; Есть подозрение, что вы конструктор изменили, потеряв там параметр $id.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: V3r</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-103</link>
		<dc:creator>V3r</dc:creator>
		<pubDate>Sat, 20 Jun 2009 14:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-103</guid>
		<description>Прошу прощения за офтоп и вопросы не по теме.

Помогите пожалуйста.
Я новичок в Kohana и столкнулся с проблемой:

$posts = ORM::factory(&#039;blog_post&#039;) -&gt; find_all(10);
foreach ($posts as $subres)
{
   echo $subres -&gt; title;
}
не возвращает значений, хотя

$post = ORM::factory(&#039;blog_post&#039;) -&gt; find(1);
$post -&gt; title

уже содержит название статьи.</description>
		<content:encoded><![CDATA[<p>Прошу прощения за офтоп и вопросы не по теме.</p>
<p>Помогите пожалуйста.<br />
Я новичок в Kohana и столкнулся с проблемой:</p>
<p>$posts = ORM::factory(&#8216;blog_post&#8217;) -&gt; find_all(10);<br />
foreach ($posts as $subres)<br />
{<br />
   echo $subres -&gt; title;<br />
}<br />
не возвращает значений, хотя</p>
<p>$post = ORM::factory(&#8216;blog_post&#8217;) -&gt; find(1);<br />
$post -&gt; title</p>
<p>уже содержит название статьи.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: BIakaVeron</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-102</link>
		<dc:creator>BIakaVeron</dc:creator>
		<pubDate>Sat, 28 Mar 2009 11:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-102</guid>
		<description>Метод with() используется только для тех таблиц, которые связаны с текущей моделью через $has_one или $belongs_to. Т.е. если объекту соответствует не более одного подобъекта, то его можно сразу подгрузить с помощью метода with(), что сэкономит один запрос. Комментарии загружаются при первом обращении к свойству comments (смотрите код метода __get() в объекте ORM) - т.н. &quot;ленивая загрузка&quot;.</description>
		<content:encoded><![CDATA[<p>Метод with() используется только для тех таблиц, которые связаны с текущей моделью через $has_one или $belongs_to. Т.е. если объекту соответствует не более одного подобъекта, то его можно сразу подгрузить с помощью метода with(), что сэкономит один запрос. Комментарии загружаются при первом обращении к свойству comments (смотрите код метода __get() в объекте ORM) &#8211; т.н. &#8220;ленивая загрузка&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: WWTLF</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-101</link>
		<dc:creator>WWTLF</dc:creator>
		<pubDate>Sun, 22 Mar 2009 14:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-101</guid>
		<description>Почему в строке $article = ORM::factory(’article’)-&gt;where(’articles.id’, intval($id))-&gt;with(’author’)-&gt;find();
нет with(&#039;comments&#039;), но далее коментарии присутствуют как подобъект. А with(’author’) есть...???</description>
		<content:encoded><![CDATA[<p>Почему в строке $article = ORM::factory(’article’)-&gt;where(’articles.id’, intval($id))-&gt;with(’author’)-&gt;find();<br />
нет with(&#8216;comments&#8217;), но далее коментарии присутствуют как подобъект. А with(’author’) есть&#8230;???</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: WWTLF</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-100</link>
		<dc:creator>WWTLF</dc:creator>
		<pubDate>Sun, 22 Mar 2009 14:40:28 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-100</guid>
		<description>public function article($id = NULL) {
is_null($id) OR !ctype_digit($id) AND url::redirect(&#039;test/articles&#039;);
$this-&gt;template = new View(&#039;test/article&#039;);
		$article = ORM::factory(&#039;article&#039;)-&gt;where(&#039;articles.id&#039;, intval($id))-&gt;with(&#039;author&#039;)-&gt;find();
		$this-&gt;template-&gt;article = $article-&gt;as_array();
		$this-&gt;template-&gt;author = $article-&gt;author-&gt;as_array();
		$this-&gt;template-&gt;comments = $article-&gt;comments-&gt;as_array();
		$this-&gt;template-&gt;render(TRUE);
	}</description>
		<content:encoded><![CDATA[<p>public function article($id = NULL) {<br />
is_null($id) OR !ctype_digit($id) AND url::redirect(&#8216;test/articles&#8217;);<br />
$this-&gt;template = new View(&#8216;test/article&#8217;);<br />
		$article = ORM::factory(&#8216;article&#8217;)-&gt;where(&#8216;articles.id&#8217;, intval($id))-&gt;with(&#8216;author&#8217;)-&gt;find();<br />
		$this-&gt;template-&gt;article = $article-&gt;as_array();<br />
		$this-&gt;template-&gt;author = $article-&gt;author-&gt;as_array();<br />
		$this-&gt;template-&gt;comments = $article-&gt;comments-&gt;as_array();<br />
		$this-&gt;template-&gt;render(TRUE);<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: BIakaVeron</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-99</link>
		<dc:creator>BIakaVeron</dc:creator>
		<pubDate>Sun, 08 Feb 2009 16:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-99</guid>
		<description>Странно, все работало, да и вполне корректно...
По сути это краткая запись выражения
If (is_null($id) OR (!ctype_digit($id)))
Т.е. если параметр $id не передан или он не состоит только из цифр. Очень удобно, как мне кажется.</description>
		<content:encoded><![CDATA[<p>Странно, все работало, да и вполне корректно&#8230;<br />
По сути это краткая запись выражения<br />
If (is_null($id) OR (!ctype_digit($id)))<br />
Т.е. если параметр $id не передан или он не состоит только из цифр. Очень удобно, как мне кажется.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: cwer</title>
		<link>http://brotkin.ru/2009/02/06/orm2-na-praktike/comment-page-1/#comment-98</link>
		<dc:creator>cwer</dc:creator>
		<pubDate>Sun, 08 Feb 2009 16:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://brotkin.ru/?p=174#comment-98</guid>
		<description>is_null($id) OR !ctype_digit($id)
у меня надо в скобки взять, чтоб работало, когда я захожу на test/author
и вообще может эту строку преобразовать, а то вообще многим может быть непонятно, что происходит :(</description>
		<content:encoded><![CDATA[<p>is_null($id) OR !ctype_digit($id)<br />
у меня надо в скобки взять, чтоб работало, когда я захожу на test/author<br />
и вообще может эту строку преобразовать, а то вообще многим может быть непонятно, что происходит <img src='http://brotkin.ru/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

