Hi,
Please consider the following table (created using a corresponding entity)
request
-------
id requestor type version items
1 a t1 1 5
2 a t1 2 3
3 b t1 1 2
4 a t2 1 4
5 a t1 3 9
The above is what I want to achieve. The version field is a calculated field others are user provided. Basically the request's version needs to be calculated based on the combination of requestor and the type. The first occurance with a given combination will have a version 1 then version 2 and so on.
I tried various things using @version on a different entity with just the three columns and joining the two entities using ManytoOne etc but I'm not able to get to the desired outcome. I dont want to confuse you with the things I tried.
Since the objective is simple there should be an easier way I suppose? Can you please help? - any help greatly appreciated!
thanks in advance