I created a test scope that adds some test condition to DB criteria and applied it in X::model()->with('Y:test')->findByPk(1) By dumping DB criteria in beforeFind I can see the condition is not added there, however by logging the sql query I can see that the condition is added to the whole query which basically means that the scope is applied but after beforeFind (tried in relation as in the example above). This makes no logical sense. How can I fix this? My version of Yii is 1.1.14.
Yii - scopes applied after beforeFind in relation
112 views Asked by user294034 At
0
There are 0 answers
Related Questions in PHP
- How to add the dynamic new rows from my registration form in my database?
- Issue in payment form gateway
- How to create a facet for WP gridbuilder that displays both parent and child custom fields?
- Function in anonymous Laravel Blade component
- How to change woocomerce or full wordpress currency with value from USD to AUD
- General questions about creating a custom theme Moodle CMS
- How to add logging to an abstract class in php
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- Composer installation fails and reverts ./composer.json and ./composer.lock to original content
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Laravel: Using belongsToMany relationship with MongoDB
- window.location.href redirects but is causing problems on the webpage
- Key provided is shorter than 256 bits, only 64 bits provided
- Laravel's whereBetween method not working with two timestamps
- Implementing UUID as primary key in Laravel intermediate table
Related Questions in SQL
- SQL schema for a fill-in-the-blank exercise
- Hibernate: JOIN inheritance question - why the need for two left joins
- What's supposed to be the problem in this query?
- Compare fields in two tables
- How to change woocomerce or full wordpress currency with value from USD to AUD
- Dynamic query creation with Array like implementation
- SQL query to get student enrolled in this month in a course - Moodle
- SQL LAG() function returning 0 for every row despite available previous rows
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Use row values from another table to select them as columns and establish relations between them (pivot table)
- SQL: Generate combination table based on source and destination column from same table
- how to use system's environnement variables in sql script
- PHP fetchAll on JOIN
- Multitable joining in Sql
- How to display name starting from 'z' by using BETWEEN cmd only?
Related Questions in YII
- Placholder for TbExtendedGridView search input
- ERROR with this combination : mPDF on Yii 1.1.29 + php 7.4
- How to tell the Yii framework to add a header x-request-id to each request?
- Yii2 authenticate through LDAP
- I cannot be able to make two dropdowns on yii2 php website pull interdependent data
- Yii not diagnosis route when first same started
- not able to setup api testing codeception for yii2
- Memcached does not work on local machine | Docker
- Yii2 Select2 Always Showing Placeholder Instead of Database Values
- Wrap string using PHP in alphine
- In Php trying to read a csv file to display in array
- Trouble Extracting Numeric Values for Summation in a Yii Grid Column Using TSumColumn
- How to display foreign key value instead of key in grid view in yii 2?
- Yii2: Create a custom column to filter records based on a condition
- How to add admin user after installing yii advanced first time?
Related Questions in SCOPES
- Trouble getting Authorization Code Scopes from Uber (DRIVER APIs)
- How to implement Google Incremental authorization using Supabase
- OAuth consent screen error 'Google has not verified this app'
- google OAuth consent screen - Google has not verify this app - "something went wrong"
- How to get Integrity Verdict Response of Google Play Integrity API
- I can't use scopes as arrays with the passport client middleware
- Insufficient authentication scopes - goggle appscript - getting project versions
- What would be a good consent description for the openid scope?
- Pom type imported dependency cannot be used without version
- Have keycloak deny (granting) token when scope is empty
- I am sending a get request to the google api to read the fitness estimated steps but it returns 401
- Insufficient Authentication Scopes Error When Using gcloud CLI to Manage Google Cloud VMs
- Google Drive API service->files->get('root') fails with "file not found.' (Scopes problem?)
- Can Different Users of a Google Apps Script Project Allow Different OAuth rights?
- Invalid Scopes: email in React Facebook login
Related Questions in YII-EVENTS
- How to know if the triggered events succeed or fail in Yii2
- Difference between afterSave and a Event in yii2?
- Yii2 Events: How to add multiple event handlers using behavior's events method?
- Yii framework folder structure
- How to extends CBehavior when using massLogout
- Yii Prioritize a same date and time
- Yii - scopes applied after beforeFind in relation
- How to use transactions in Yii event
- When should I call parent::beforeDelete() in my Yii model
- get data from db using an array in yii
- Yii trigger component event from controller action
- $_POST[] Value disappears in admin- but works in view-module
- Yii afterfind is not firing
- How does Yii event handling work?
- Yii update row fails to update 2 variables at the same time
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)