__PACKAGE__->register_method(
method => 'retrieve_lineitem',
api_name => 'open-ils.acq.lineitem.retrieve',
+ authoritative => 1,
signature => {
desc => 'Retrieves a lineitem',
params => [
$logger->info("created @li_ids new lineitems for picklist $picklist");
- # new editor, no transaction needed this time
- $e = new_editor("authtoken" => $auth) or return $e->die_event;
+ # new editor, but still using transaction to ensure correct retrieval
+ # in a replicated setup
+ $e = new_editor("authtoken" => $auth, xact => 1) or return $e->die_event;
return $e->die_event unless $e->checkauth;
$conn->respond($RETRIEVERS{"lineitem"}->($e, $_, $opts)) foreach @li_ids;
+ $e->rollback;
$e->disconnect;
undef;
return handler(li);
fieldmapper.standardRequest(
- ['open-ils.acq', 'open-ils.acq.lineitem.retrieve'],
+ ['open-ils.acq', 'open-ils.acq.lineitem.retrieve.authoritative'],
{ async: true,
params: [self.authtoken, liId, {