<?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"
	>
<channel>
	<title>Comments on: Ruby on Rails: SQL Server 2005 Pagination</title>
	<atom:link href="http://alexle.net/archives/292/feed" rel="self" type="application/rss+xml" />
	<link>http://alexle.net/archives/292</link>
	<description>Personal View</description>
	<pubDate>Thu, 09 Sep 2010 16:02:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Mike King</title>
		<link>http://alexle.net/archives/292#comment-248765</link>
		<dc:creator>Mike King</dc:creator>
		<pubDate>Thu, 26 Feb 2009 20:38:11 +0000</pubDate>
		<guid isPermaLink="false">http://alexle.net/?p=292#comment-248765</guid>
		<description>I found one problem with the patch.  The use of .id as the default order by criteria doesn't always work.  For example in my work I've got a lot of legacy tables, and most don't use .id as the primary key.  For instance my Personnel table has primary key personid.

This results in bad sql generated when no :order by is specified in the find.  And also when I use Personnel.count() it uses .id, and there's no way to specify an order in this case.

A simple solution might be to use the primary key or id() in the place of .id</description>
		<content:encoded><![CDATA[<p>I found one problem with the patch.  The use of .id as the default order by criteria doesn&#8217;t always work.  For example in my work I&#8217;ve got a lot of legacy tables, and most don&#8217;t use .id as the primary key.  For instance my Personnel table has primary key personid.</p>
<p>This results in bad sql generated when no :order by is specified in the find.  And also when I use Personnel.count() it uses .id, and there&#8217;s no way to specify an order in this case.</p>
<p>A simple solution might be to use the primary key or id() in the place of .id</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.236 seconds -->
