php - CakePHP: buildStatement() and behaviors -


in 1 of models need sql query of find() request , combine other sql queries before fetching data db. in case: <sqlquerya> , <sqlqueryb> (from different models) need combine <sqlquerya> union <sqlqueryb>.

the creation of single queries possible pdosource.buildstatement(), partly. problem comes when model uses behavior (e.g. translatebehavior). in case, buildstatement returns sql query before behavior has handled query. query adjustments of behavior not visible in query of buildstatement. query returned different query used find() request.

i had different ideas tried implement, without success. therfore question:

is possible manually call behaviors beforefind() method correct result? if yes, how? if not: there way paginate data of different models not associated each other?


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -