File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class Simple implements LabelledInterface
3434 protected $ one ;
3535
3636 /**
37- * @HasMany(target="WithTable")
37+ * @HasMany(target="WithTable", where={"id": {">": 1}} )
3838 * @var WithTable[]|Collection
3939 */
4040 protected $ many ;
Original file line number Diff line number Diff line change 2222use Cycle \Schema \Generator \ResetTables ;
2323use Cycle \Schema \Generator \SyncTables ;
2424use Cycle \Schema \Registry ;
25- use Cycle \Schema \Relation \HasMany as HasManyRelation ;
2625
2726abstract class HasManyTest extends BaseTest
2827{
@@ -45,5 +44,9 @@ public function testRelation()
4544 $ this ->assertArrayHasKey ('many ' , $ schema ['simple ' ][Schema::RELATIONS ]);
4645 $ this ->assertSame (Relation::HAS_MANY , $ schema ['simple ' ][Schema::RELATIONS ]['many ' ][Relation::TYPE ]);
4746 $ this ->assertSame ("withTable " , $ schema ['simple ' ][Schema::RELATIONS ]['many ' ][Relation::TARGET ]);
47+
48+ $ this ->assertSame ([
49+ 'id ' => ['> ' => 1 ]
50+ ], $ schema ['simple ' ][Schema::RELATIONS ]['many ' ][Relation::SCHEMA ][Relation::WHERE ]);
4851 }
4952}
You can’t perform that action at this time.
0 commit comments