View more context

 

harvs1789uk

Wait...I am not even using getComponents() 🤦 I have this:

  1. $list = CreativeWork::get()
  2. ->sort([
  3. 'Created' => 'DESC',
  4. 'ID' => 'ASC'
  5. ]);
harvs1789uk

Ah, I suspect it is showing me draft objects because I am logged in as admin right...

rista

Hi, is there option that I can update sql mode for my custom SQLSelect?

kinglozzer

You can always just run a DB::query() with some raw SQL

kinglozzer

There’s no direct PHP API available for it though

kinglozzer

I assume this is what you mean by “sql mode”, from a recent project:

  1. // MySQL 5.7+ is much more strict on grouping. Instead of rewriting the entire ORM-generated query,
  2. // we can just shut it up by putting it in a more lenient mode for this query
  3. DB::query("SET SESSION sql_mode='REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE';");

Mo

Quick question, is it possible to manually call an extension hook on a DataObject?

Mo

I want to test what happens when I use an particular extension hook