I've got a one-to-many relationship (employees belong to a department),
and I'd like to search for departments that have no employees.
Currently, I have something like:
foreach(dept : departments) {
if(dept.getEmployees().size() == 0)
context.deleteObject(dept);
}
When I do this, it has the effect of telling Cayenne to fetch data rows
for every employee in the database; this will not scale well. Is there
any way I can get the size of the array without doing a custom SELECT
query?
- Get the number of FKs Scott Anderson
- Re: Get the number of FKs Michael Gentry
- RE: Get the number of FKs Scott Anderson
- Re: Get the number of FKs Michael Gentry
- Re: Get the number of FKs Mike Kienenberger
- Re: Get the number of FKs Michael Gentry
- RE: Get the number of FKs Scott Anderson
- Re: Get the number of FKs Michael Gentry
- RE: Get the number of FKs Scott Anderson
- Re: Get the number of FKs Robert Zeigler
- Re: Get the number of FKs Mike Kienenberger
