On 10/18/07 5:03 PM, Lamprecht wrote:
> while I'm doing my first steps into Rose::DB, I face the following problem:
> I am looking for a way to maintain identity of Rose::DB::Object
> instances, that share the same PK. ( Represent the same row ).
> 
> I hoped deriving from Rose::DB::Object::Cached would achieve this, but
> it seems, that this is not true for Instances returned by the
> Rose::DB::Object::Manager derived Classes.

That is correct.  If you want to cover all possibilities, I suggest
overriding new() or init() in your Rose::DB::Object-derived common base
class.  The Manager will call new() (which will call init()) when it creates
objects (in the absence of the inject_results parameter, that is).

But really, I'd think twice about trying to do this at all.  The default
behavior where each new object is its own separate entity is a lot easier to
understand and debug.

-John



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to