[Dbix-class] Loading data from other sources
Jan Harders
jan at delinquent.de
Tue Oct 8 23:09:15 GMT 2013
Hey everybody,
If I wanted to do crazy things and basically want to fetch (and
overwrite) data in an object on creation, how would I go about that?
Let's say I have tables tablea and tableb which are identical. On some
occasions, I need to fetch data from tableb when my tablea-Object is
requested (be it by $rs->search, $rs->find or through relationships).
For the sake of an example:
If tablea.id is even, I want to look up if there's a row in tableb with
the same id. if there is, I want to replace the values in the row-object
without the application that uses it knowing (and having to care).
where would I put something like that? Is that even possible?
Thanks,
jan
More information about the DBIx-Class
mailing list