fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] vorburger commented on a change in pull request #1140: FINERACT-1065: Fixing integration test issues
Date Fri, 03 Jul 2020 14:07:54 GMT

vorburger commented on a change in pull request #1140:
URL: https://github.com/apache/fineract/pull/1140#discussion_r449601464



##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionRepository.java
##########
@@ -21,11 +21,13 @@
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 
 public interface SavingsAccountTransactionRepository
         extends JpaRepository<SavingsAccountTransaction, Long>, JpaSpecificationExecutor<SavingsAccountTransaction>
{
 
     @Query("select sat from SavingsAccountTransaction sat where sat.id = :transactionId and
sat.savingsAccount.id = :savingsId")
-    SavingsAccountTransaction findOneByIdAndSavingsAccountId(Long transactionId, Long savingsId);
+    SavingsAccountTransaction findOneByIdAndSavingsAccountId(@Param("transactionId") Long
transactionId,
+            @Param("savingsId") Long savingsId);

Review comment:
       @awasum @ptuomola I think it should work without this - but there is a subtlety: Spring
can only find out the name of parameters if code is compiled with `-parameters`; NB e.g. _To
store formal parameter names in a particular .class file, and thus enable the Reflection API
to retrieve formal parameter names, compile the source file with the -parameters option to
the javac compiler._ on https://docs.oracle.com/javase/tutorial/reflect/member/methodparameterreflection.html.
To be able to run in Eclipse, you need to enable https://stackoverflow.com/a/37391164/421602.
In an ideal world, we could figure out how to add this to Gradle to have Buildship do that..
or we could keep a `.settings/` in Git.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message