Announcement

Collapse
No announcement yet.

ORM API - can I use ->where(...) with ->findRelated(...)?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ORM API - can I use ->where(...) with ->findRelated(...)?

    Hi! I tried using ->where(...) method in conjunction with ->findRelated(...) and it didn´t work. Is it possible? If so could you present an example?

    Thanks in advance.
    Arthur

  • #2
    Hi Arthur,

    No. But you can specify the params argument
    PHP Code:
    ->findRelated($entity'linkName', [
       
    'whereClause' => [
            
    'attributeName' => 'Value'
       
    ]
    ]); 

    Comment


    • #3
      Yurikuzn, thanks! Would it be possible to use the 'whereClause' presented to filter dates greater than a specified value? If so, could you please show an example again?
      Best,
      Arthur

      Comment


      • #4
        'dateAttribute>' => '2019-10-10'

        Comment

        Working...
        X