RESTful-Drupal / restful

RESTful best practices for Drupal
https://drupal.org/project/restful
419 stars 173 forks source link

Cannot filter != or NOT IN #1047

Open LevEricCheung opened 5 years ago

LevEricCheung commented 5 years ago

I am a little new at this but I'm trying to find out why when filtering using != (and NOT IN) does not work, all the other operators (=, >, >=, <, <=) seem to work fine.

It throws an error when querying on GET on my server:

/api/ticket?filter[ticket_number][value]=220080&filter[ticket_number][operator]="!="

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1", "title": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node.entity_id' in 'where clause'", "status": 500 }

Ticket is a node. A Ticket__1_0.php was created that extends resourceNode Ticket number is a field created with Field API. Data provider is pointing to DataProviderEntity.

If anyone can help steer me in the right direction on where to look to fix the problem, it would be appreciated!

ordavidil commented 5 years ago

@echeung3

1051 is merged and seems to solve your issue as well.