-
Notifications
You must be signed in to change notification settings - Fork 2.3k
FINERACT-2351: Minor fixes to make it work with PostgreSQL and response fix for TaxGroup #4939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
@sidhantgoel Please rebase with latest develop branch. |
| private BigDecimal percentage; | ||
| private Integer debitAccountType; | ||
| private Long debitAccountId; | ||
| private Long debitAcountId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not a typo, intentional because this is the spelling used in many places including web app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this must be set to debitAccountId, if it exists in other parts of the Apache Fineract then it must be fixed. WebApp is not an Apache Fineract Project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sidhantgoel As Victor stated, please dont introduce typos into the Fineract backend! Kindly asking you to fix the UI instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sidhantgoel Please undo this!
| String sql = "select " + TAX_COMPONENT_MAPPER.getSchema(); | ||
| return this.jdbcTemplate.query(sql, TAX_COMPONENT_MAPPER); // NOSONAR | ||
| return this.jdbcTemplate.query(con -> con.prepareStatement(sql, | ||
| ResultSet.TYPE_SCROLL_SENSITIVE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this: ResultSet.TYPE_SCROLL_SENSITIVE, ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we dont use this, the resulset returned in case of PostgreSQL we can navigate in only one direction. but since we are moving back in some cases a scrollable result set is required.
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review my comments!
Testing is missing, please make sure to attach proper test cases which ensures the fixed, correct behaviour!
587a0ed to
c315dca
Compare
c315dca to
fe12c72
Compare
|
@sidhantgoel Please squash your commits! |
fe12c72 to
285f1d0
Compare
|
@adamsaghy done |
285f1d0 to
eff2983
Compare
|
@adamsaghy would you be able to review it please. |
@sidhantgoel Please fix the failing tests first! |
eff2983 to
c073e8a
Compare
|
@adamsaghy Is there a document on how to run test cases locally? |
you can find some materials on my website: www.fineract-academy.com |
c073e8a to
aab4042
Compare
|
@adamsaghy fixed the errors. |
|
Please use appropriate FINERACT jira number in the title and in the commit message! |
|
There is no jira ticket for this, shall I create one? |
…fix variable name typos in TaxComponentRequest; update SQL query preparation in TaxReadPlatformServiceImpl for PostgreSQL compatibility.
aab4042 to
e53e4a8
Compare
|
@adamsaghy is it ok now? |
| public List<TaxComponentData> retrieveAllTaxComponents() { | ||
| String sql = "select " + TAX_COMPONENT_MAPPER.getSchema(); | ||
| return this.jdbcTemplate.query(sql, TAX_COMPONENT_MAPPER); // NOSONAR | ||
| return this.jdbcTemplate.query(con -> con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not convinced we need ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE), this services just retrieve a List of TaxComponentData AS-IS, no any iteration on them back or forth...
Can you help me to understand why this is an issue?
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly see my review and concerns!
Also please make sure the functionality to be covered with test cases to ensure, now it works as expected!
|
This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days. |
|
@sidhantgoel are you still working on it? |
|
This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days. |
|
@sidhantgoel Are you still working on this? |
|
This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days. |
Description
Both issues have been fixed.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.