Sorry for the bad title, I don't really know how to word it better:
I have the following tablestructure:
Table A --> Table B <-- Table C (proceeds) --> Table D(prcoeeding_status)
-------- -------- ------- -------
aID bID cID dID
... .... created textValue
f_bID .... f_bID
f_dID
meaning A and C have a foreign key pointing to B and C also has a foreign key pointing to D
I have a predicate like this (root being the Table A):
constraintCondition = (TableA.join("Table B key")
.joinList("Table C Key")
.join("Table D Key").get("value from table D"))
.in(someValues);
This works fine and gives me the expected results. Now I need to add another constraint, selecting only entries where in Table C a date-entry (namely 'created') is between a Startdate and Enddate. How do I chain another predicate to this predicate, or how do I need to modify this predicate, so that I will get the desired effect?
EDIT:
I got an answer to this question here: JPA 2 criteria API: How to select values from various joined tables without using Metamodel?