[TYPO3-mvc] Intersect / Select

Felix Kopp felix-source at phorax.com
Wed Mar 28 20:57:00 CEST 2012


Dear List,

please share your best practices:

I am working on a data structure
fe_users <- "extended_fe_users".

These extendedFeUsers contain several
different datasets: e.g. "Jobs".

These datasets are added within the extendedFeUsers as IRRE entries.
Relation between extendedFeUsers to Jobs is 1:n.


Now I need to get a limited list of Jobs.

These Jobs should be retrieved from a JobRepository (of course).
But only Jobs for "active" extendedFeUsers should be returned.

The dot notation (on job) can not work, because Job only "passthrough" 
to extendedFeUsers.

Constraints might look like this:
Limit Jobs for different properties (not disable, crdate in range, …)
AND only for specific extendedFeUsers.

=Alternative 1=

- users = extendedFeUsersRepository->findSpecific…()
- jobs = users->getJobs() <-- allJobs
	iterate jobs and remove unwanted (constraints above).
*uncool

=Alternative 2=

- jobs = jobsRepository->findDemanded:
	find wanted jobs (constraints above)
	AND jobs.extendedFeUsers IN (extendedFeUsersRepository->findSpecific…() 
--> uid-List of users)
*uncool

=Alternative 3=

- jobs = jobsRepository->findDemanded
	DB-statement with inner join
*uncool


All possibilities seem pretty nasty considering there are 50.000+ users
with several hundred jobs per user --> only few Jobs must be found.

The model seems to be sufficient :).







More information about the TYPO3-project-typo3v4mvc mailing list