Skip to content
Browse files

fixing old issues with wrongly indexed values

  • Loading branch information...
1 parent d6cf853 commit 76829834e00c4851dc94fc677846bf78c9dc6b2e @andrewalker committed Jul 27, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 lib/Form/SensibleX/FormFactory.pm
View
12 lib/Form/SensibleX/FormFactory.pm
@@ -272,7 +272,17 @@ sub get_form {
sub get_row {
my $self = shift;
- return $self->container->resolve(service => '/Model/row');
+
+ my $c = $self->container->get_sub_container('Model');
+ my $row = $c->resolve(service => 'complete_row');
+ my $rs = $c->resolve(service => 'resultset');
+
+ # $row->id returns the primary keys for the recently added row
+ # so I fetch the $row again from the database.
+ # I do this because otherwise some inflated fields (dates, etc),
+ # or fields formatted from the RDBMS such as money are not correctly
+ # inflated for ElasticSearch.
+ return $rs->find($row->id);
}
sub execute {

0 comments on commit 7682983

Please sign in to comment.
Something went wrong with that request. Please try again.