[DBIx-Class-Devel] [dbix-class] Feature/cdbi implicit inflate (#51)
ungrim97
notifications at github.com
Fri Jul 18 14:27:05 GMT 2014
Class::DBI allows the foreign_class to be a non database class. e.g DateTime.
Inflation and deflation can be controlled either by supplying:
__PACKAGE__->has_a(accessor => 'Foreign::Class', inflate => sub {}, deflate => sub {});
however if inflate isn't supplied then CDBI will call: Foreign::Class->new($val) and if deflate is not supplied it will stringify "$val".
This behaviour is mostly used for inflation and deflation of datetime columns and should be emulated
You can merge this Pull Request by running:
git pull https://github.com/ungrim97/dbix-class feature/cdbi_implicit_inflate
Or you can view, comment on it, or merge it online at:
https://github.com/dbsrgits/dbix-class/pull/51
-- Commit Summary --
* Added test for implicit inflation/deflation of CDBI has_a
* Added handling for Implicit inflate/deflate of CDBI has_a relationships
-- File Changes --
M lib/DBIx/Class/CDBICompat/Relationships.pm (67)
A t/cdbi/70_implicit_inflate.t (33)
A t/cdbi/Date.pm (42)
-- Patch Links --
https://github.com/dbsrgits/dbix-class/pull/51.patch
https://github.com/dbsrgits/dbix-class/pull/51.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class/pull/51
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20140718/83bc5fcd/attachment.htm>
More information about the DBIx-Class-Devel
mailing list