You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to access a value of a json field in my field list (returns many results and processing serverside isn't very feasible because of speed concerns). I'm getting an error in /data/source/Database.php on line 680. It appears to be splitting all the field name values on '.' in order to sort them?
I have also tried 'MyModel.price' => 'IFNULL(prices->\'$."1"\', prices->\'$."default"\')' and received the same result.
To my knowledge there is no way to retrieve data from a JSON field within a query without specifying a path, which requires using the '$.field' notation. Is there a way for me to mark this as a calculated field and prevent this from happening? Alternately is there an official way to access JSON fields with li3, or to disable this "sorting" from occurring?
The text was updated successfully, but these errors were encountered:
Lithium Version: 1.0
I'm trying to access a value of a json field in my field list (returns many results and processing serverside isn't very feasible because of speed concerns). I'm getting an error in /data/source/Database.php on line 680. It appears to be splitting all the field name values on '.' in order to sort them?
I have also tried
'MyModel.price' => 'IFNULL(prices->\'$."1"\', prices->\'$."default"\')'
and received the same result.To my knowledge there is no way to retrieve data from a JSON field within a query without specifying a path, which requires using the '$.field' notation. Is there a way for me to mark this as a calculated field and prevent this from happening? Alternately is there an official way to access JSON fields with li3, or to disable this "sorting" from occurring?
The text was updated successfully, but these errors were encountered: