This is Greg Piatigorski's TypePad Profile.
Join TypePad and start following Greg Piatigorski's activity
Greg Piatigorski
Recent Activity
Dave, I am a long time DBA, going back to early '80s, working with mainframe to mid to personal db engines, and perhaps my take on the subject is so different here. .first, to me, implies ANY record, at least to someone who has been a DBA for so long. SQL is a pretty powerful and flexible language and as with any other language out there one has to code for specific results if one wants specific results. Rails is a binder, not an SQL "cop", IMHO. Should Rails be changed to also issue DISTINCT clause, or GROUP BY on every data request when this ability is already built into SQL from the start, as is ORDER BY? I am not sure what the issue is when .first means ANY record from a result set. Absolutely so. There is a reason SQL has WHERE clause, ORDER BY, DISTINCT, GROUP BY and all other tricks and abilities built in. .first with WHERE clause should do the job just fine?
A subtle potential bug in most Rails applications
The ActiveRecord component in Rails offers a convenient and powerful interface between the set-oriented world of relational databases and the object-oriented world of Ruby programs. However, there's a potential bug lurking in many (if not most) Rails applications due to a subtle implication of t...
Is assumption here to have Rails actually do Top n query? If not, I am not sure this is a bug. There is a difference between .first and Top 1.
A subtle potential bug in most Rails applications
The ActiveRecord component in Rails offers a convenient and powerful interface between the set-oriented world of relational databases and the object-oriented world of Ruby programs. However, there's a potential bug lurking in many (if not most) Rails applications due to a subtle implication of t...
Greg Piatigorski is now following The Typepad Team
Mar 23, 2012
Subscribe to Greg Piatigorski’s Recent Activity
