On Mon, Apr 02, 2007 at 01:58:24PM +0200, Manoel Lemos wrote: > Jens, > > There is an easy way to fully load a record when it is not fully loaded > already. > However, I don't know if this is something nice to have as a default on > AAF, since being able to select fields is always good, imagine reloading > big BLOBS everytime you change something and you just want to update the > record name and description. > > Maybe you should add a configuration on the field definition, if > :auto_reload => :yes, it will do automatically the full load. > > model_object.reload will do the job.
well, I knew of that but of course I only wanted to do the reload if the record has not been fully loaded initially. What about that: You could override the to_doc instance method to check if your record has been completely loaded, and if not, call reload, and then call super. However if you always need to reload your record this way, you'd better not use :select in the first place and save you the hassles. Jens -- Jens Krämer webit! Gesellschaft für neue Medien mbH Schnorrstraße 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 [EMAIL PROTECTED] | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

