2007/1/21, John Siracusa <[EMAIL PROTECTED]>: > On 1/21/07 3:02 PM, Svilen Ivanov wrote: > > I found 2 workarounds: > > * call load(with => 'appointments') - this will eagerly re-fetch the > > appointments > > * undef the current instance and create new instance, like this: > > $user = User->new(id => $user->id)->load; > > > > None of these seem elegant to me > > How about a Helper method that examines the current collections of related > objects (using the has_loaded_related() utility function) and then > constructs and executes the proper call to load(with => ...)? Writing such > a thing wouldn't be hard, especially if you only care about related objects > one level deep.
Thank you for your prompt answer! The proposed solution will do - I currently do need it on one level deep only. However I was expecting to find a way to make RDBO object `dirty' so further access to any of the properties will make it reload. Anyway - I always can make helper to the job (either by checking has_loaded_related() or by brute force destroy+load) Thanks again for the help, Svi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object