[Catalyst-commits] r8285 - in
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk: .
lib/CatalystX/CRUD/Model lib/CatalystX/CRUD/Object
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Mon Aug 25 19:32:53 BST 2008
Author: karpet
Date: 2008-08-25 19:32:53 +0100 (Mon, 25 Aug 2008)
New Revision: 8285
Modified:
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Object/RDBO.pm
Log:
0.14 release
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes 2008-08-25 17:34:43 UTC (rev 8284)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes 2008-08-25 18:32:53 UTC (rev 8285)
@@ -45,5 +45,7 @@
0.13 23 Aug 2008
* support new *_related methods in core API
+0.14 25 Aug 2008
+ * fix add_related() to forget_related() after save, so that next access reflects the addition.
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2008-08-25 17:34:43 UTC (rev 8284)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2008-08-25 18:32:53 UTC (rev 8285)
@@ -7,7 +7,7 @@
use Carp;
use Data::Dump qw( dump );
-our $VERSION = '0.13';
+our $VERSION = '0.14';
__PACKAGE__->mk_ro_accessors(qw( name manager treat_like_int ));
__PACKAGE__->config( object_class => 'CatalystX::CRUD::Object::RDBO' );
@@ -352,6 +352,9 @@
my $fpk = $meta->{map_to}->[1];
$obj->$addmethod( { $fpk => $fk_val } );
$obj->save;
+
+ # so next access reflects change.
+ $obj->forget_related($rel_name);
}
sub rm_related {
@@ -371,6 +374,8 @@
object_class => $meta->{map_class},
where => $query,
);
+
+ # so next access reflects change
$obj->forget_related($rel_name);
return $obj;
}
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Object/RDBO.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Object/RDBO.pm 2008-08-25 17:34:43 UTC (rev 8284)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Object/RDBO.pm 2008-08-25 18:32:53 UTC (rev 8285)
@@ -3,7 +3,7 @@
use warnings;
use base qw( CatalystX::CRUD::Object );
-our $VERSION = '0.13';
+our $VERSION = '0.14';
=head1 NAME
More information about the Catalyst-commits
mailing list