Score:0

I used = in entity query condition, but the actual SQL uses LIKE

in flag

The code is

$entity_query->condition("field_gov.entity.field_name", $time, '=');

The actual sql is

WHERE "paragraph__field_name"."field_name_value" LIKE 'ss' ESCAPE '\\'

I want the actual sql also use =. How can I do?

Lambic avatar
ph flag
If it only happens on paragraph fields it could be a bug in paragraph module
cn flag
See line 115 of core/lib/Drupal/Core/Entity/Query/Sql/Condition.php. The field type for your `field_name_value` is configured so that queries for it are not considered case sensitive, which Drupal realises using `LIKE` instead of `=`. Is it causing you an actual problem that you need to fix?
Major avatar
in flag
It looks like an entity reference problem,Is there a solution?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.