[Dbix-class] copying between databases
David Kamholz
davekam at pobox.com
Thu Feb 9 03:01:02 CET 2006
Hmm... shouldn't be too hard to do, I suppose. Sounds like a useful
thing, so I might just try to write something up to do it. $obj-
>result_source->relationships gives you a list of relationships, and
relationship_info gives you the necessary details. You'd then just
need a recursive function clever enough to do the right
create_related (probably find_or_create_related) calls.
Dave
On Feb 8, 2006, at 7:48 PM, Alan Humphrey wrote:
> Before I get too deep into this problem I thought I’d ask here,
> just in case there’s a simple solution I’m not seeing.
>
> I have two databases sharing a schema. The staging database gets
> edited and, eventually, the edits are “published” to the production
> database.
>
> Question: is there a straightforward way to copy a record *and all
> of the related data* from one database to another?
>
> Thanks!
>
> - Alan
More information about the Dbix-class
mailing list