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.

-John



-------------------------------------------------------------------------
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

Reply via email to