[Dbix-class] Unnecessary re-fetching via belongs_to relationships?

Matt S Trout dbix-class at trout.me.uk
Thu Jun 29 01:17:38 CEST 2006


Mark Blythe wrote:
>> Yeah, it currently does that.
> 
> Ok, thanks for confirming it.  I'll do my best to re-factor my code
> around it for now.
> 
>> Making it the same object would either create a circular reference or result in
>> one copy going out of scope taking the rest out of scope.
> 
> Maybe weak references (5.8+) and/or proxy objects?

Weak refs => one copy going out of scope takes the rest out of scope

Proxy objects ... hard to do nicely. I suspect making the objects their "own 
man" and caching the data itself elsewhere would be safer.

> (although a data caching solution would be cool)
> 
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive: http://www.mail-archive.com/dbix-class@lists.rawmode.org/


-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list