Hi,
I was wondering what would be the best way to tackle this… I need to track a customer’s status and changes over time. My questions are:
- If I map the entities as attached, issues I ran into: retrieving the latest status for the customer.
customer ()>-(1) customer_status (1)-<() status
In SQL, I would use the following query:
select cs.customer.name, max(cs.date)from customer_status cs
where cs.customer.id = xyz
group by cs.customer.name
Would you suggest:
a) Defining the above in a datasource using JPQL? If so, what’s the syntax; or
b) Creating my own custom datasource, helpers, etc.?
- I haven’t taken a look at the BPM module yet but this sounds like it would be a fit (there is an element of state and workflow in my requirements). However, I’m guessing I would still need to resolve the issue above?
Would appreciate your thoughts on this.
Cheers,
Eddy