From: Nathaniel Talbott Date: 2004-01-13T01:11:52+09:00 Subject: Re: Query syntax in O-R mapping (was: Database applications and OOness) On Jan 11, 2004, at 12:16, Francis Hwang wrote: > That's interesting. I didn't realize that Criteria was meant for data > stores beyond just SQL stores. Cool stuff. This is the #1 reason I'm using Criteria in my app: I get completely transparent query result caching. All I have to do is store returned objects in a Set (with some expiration rules built in) and run Criteria queries against the Set before running them against the actual db. I do still have the cost of a count on the database to determine whether all the results of the query are in the cache, but that's fairly cheap in comparison to actually returning the result set and building objects out of it. If you need query result caching, I'd suggest giving Criteria a good look. Just my $0.02, Nathaniel P.S. I haven't had any issues with the incomplete similarity between Criteria syntax and Ruby syntax causing me confusion. But then, Ron Jeffries says I'm like that... [ruby-talk:83078] :-) <:((><