Pageable reader with join fetch to override FetchType.LAZY

I am using models written by someone else. These models are used by several people in my company and FetchType in relationships are LAZY. So I used a JpaPagingItemReader as follow : @Bean @StepScope public JpaPagingItemReader<Person> jpaPagingItemReader(EntityManagerFactory emf, @Value(“#{jobParameters[‘customer.id.start’]}”) long customerStart, @Value(“#{jobParameters[‘customer.id.end’]}”) long customerEnd){ String query = “select p ” + “from Person p “…

Details

Laravel throw ValidationException but not hitting destroy method’s catch block?

I am trying to return a custom exception message using Laravel’s ValidationException class. I have it successfully working in the following example: public function store(Request $request) { $this->validate($request, CurrencyValidatorArrays::$store); try { $this->currenciesInstance->createOrUpdateCurrency($request->all()); return redirect()->route(‘currencies.index’) ->with(‘success’, ‘Successfully created currency’); } catch (Exception $e) { return redirect()->route(‘currencies.create’) ->with(‘error’, $e->getMessage()); } } where the exception is thrown from…

Details