For my current needs however I may not be able to use it as I am supposed to use only those CPAN-modules that can be found in the ubuntu-repositories.
But be it as it may - is there an easy way in DBIx::Class to create a row belonging to another resultset based on a given resultset that would copy over all shared attributes?
In pseudo-code something like:
As a related question I know I can get plain hashes from a resultset with DBIx::Class::ResultClass::HashRefInflator but only when I use it as a setting on the resultset-class.my $rs1 = $schema->resultset("table1"); my $rs2 = $schema->resultset("table2"); my $o1 = $rs1->find({ id => $id }); my $o2 = $rs2->create_copy($o1); # does something like this exist?
But how would I convert a row that I have already retrieved, i.e. something like
Many thanks!my $o = $rs1->find({ id => $id }); my $hash_ref = $o->as_hashref; # does this exist?
In reply to Re^2: data historization with DBIx::Class
by morgon
in thread data historization with DBIx::Class
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |