public BigDecimal getBalance(final UUID accountId, final Date date)
I don’t understand (the purpose) why do you use final Date date. When do we provide different dates? It’s used only currentTimestamp() that return current date.
The App works without final Date date as well.
Hi,
The service is capable of calculating balance for any date. The client sends current date as a parameter to the service. This is how the app works.
Doesn’t work(see below). Maybe you refer to …Report by categories.
Is there any possibility to convey the (new modified) date (from the generic filter) to middleware (persistence Interface) or the only solution is to use dataManager in UIController?
The goal is to modify the Balance and accounts accordingly to date filter.
Maybe I can use something like
public BigDecimal getBalance(final UUID accountId, final Date startdate, final Date enddate)
I’ve chosen to use my own dateField(s).
I use this query:
select e from myEntity e where e.date >= :start and e.date<=:end
Unfortunately if I delete (manually) the (end) date and apply the filter again I have this error: Caused by: com.haulmont.cuba.core.global.DevelopmentException:Parameter end is not used in the query at com.haulmont.cuba.core.app.JpqlQueryBuilder.getQuery(JpqlQueryBuilder.java:188) ~[na:na] at com.haulmont.cuba.core.app.RdbmsStore.createQuery(RdbmsStore.java:713) ~[na:na] at com.haulmont.cuba.core.app.RdbmsStore.loadList(RdbmsStore.java:231) ~[na:na] at com.haulmont.cuba.core.app.DataManagerBean.loadList(DataManagerBean.java:78) ~[na:na] at com.haulmont.cuba.core.app.DataServiceBean.loadList(DataServiceBean.java:54) ~[na:na] at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_221] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_221] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) ~[spring-aop-5.1.6.RELEASE.jar:5.1.6.RELEASE] ...etc
Could be the same issue with:
Can you help me please with the same example using setCondition(programatically)?
Now if I delete (manually) the (end) date and apply the filter again, I don’t have any errors but myentityDl.load() doesn’t work.