ankita10r commented on a change in pull request #1890:
URL: https://github.com/apache/fineract/pull/1890#discussion_r728230204
##########
File path:
fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepository.java
##########
@@ -18,9 +18,12 @@
*/
package org.apache.fineract.accounting.glaccount.domain;
+import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface GLAccountRepository extends JpaRepository<GLAccount, Long>,
JpaSpecificationExecutor<GLAccount> {
// no added behaviour
+ //adding behaviour to fetch id by glcode for opening balance bulk import
+ Optional<GLAccount> findOneByGlCode(String glCode);
Review comment:
GLAccountNotFoundException is a more accurate exception rather than the
one thrown by Optional (NoSuchElementException)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]