Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
how to set conditions to _has_many
  • i want to set condtions to _has_many relation so i'm having this code, that generate an sql querry with erros, i'm having is not `` instead of is not null
    ON (`t0`.`id` = `t2`.`queue_id` AND `t2`.`advisor_connected_at` IS NOT ``)

    here is the _has_many relation array:
    protected static $_has_many = array(
    'ongoing_invitations' => array(
    'key_from' => 'id',
    'model_to' => 'Model_Invitation',
    'key_to' => 'queue_id',
    'cascade_save' => false,
    'cascade_delete' => false,
    'conditions' => array(
    'where' => array(
    array('advisor_connected_at', 'is not', null),
    ),
    ),
    ),
    );
  • HarroHarro
    Accepted Answer
    You found a bug.

    I have fixed it in 1.8/develop, the fix will be part of the 1.7.2 release. If you need it you can backport fuel/core/classes/database/query/builder/join.php to 1.7.1 without problems.
  • Thank for the fix

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion