Browse Source

Support column filters on relations

Maurits van der Schee 8 years ago
parent
commit
5fbc2c66e9
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      tests/tests.php

+ 7
- 0
tests/tests.php View File

@@ -517,4 +517,11 @@ class PHP_CRUD_API_Test extends PHPUnit_Framework_TestCase
517 517
 		$test->expect('{"posts":[{"category_id":"1","categories":[{"id":"1"}]}]}');
518 518
 	}
519 519
 
520
+	public function testColumnsOnImplicitJoin()
521
+	{
522
+		$test = new API($this);
523
+		$test->get('/posts?include=tags&columns=posts.id,tags.name&filter=id,eq,1&transform=1');
524
+		$test->expect('{"posts":[{"id":"1","post_tags":[{"post_id":"1","tag_id":"1","tags":[{"id":"1","name":"funny"}]},{"post_id":"1","tag_id":"2","tags":[{"id":"2","name":"important"}]}]}]}');
525
+	}
526
+
520 527
 }

Loading…
Cancel
Save