From: "Zed A. Shaw" Date: 2005-12-13T10:41:17+09:00 Subject: Re: Hibernate on Ruby On Tue, 13 Dec 2005 07:55:02 +0900 Eero Saynatkari wrote: > List Recv wrote: > > Example for me: > > Let's say I have a class hierarchy, in which a particular field is > > stored direclty in the db for one class, and calculated using a > > simple SQL formula for other other classes. How can I use the DB > > to query the tree for all objects where field == aVal. > > > > Answer: In ActiveRecord - you can't (w/o major hacking). You need > > to instantiate each one from the db, and then use Ruby to check > > each one. > > Google up Og and Kansas and see if either suits you better. > Both take a modeling approach perpendicular to AR. There > are others also, I am sure. > > Or, of course, you could restructure your data :) No, that'd actually involve admitting he is wrong. The day a programmer actually admits he's wrong is the day Satan ice skates around Times Square in July eating Tasti-Delight while wearing long underwear. For another great example of "fighting to always be right" refer to any thread about plural table names (either side). Zed A. Shaw http://www.zedshaw.com/