File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,11 @@ public function run(Registry $registry): Registry
6666
6767 // All child should be presented in a schema as separated entity
6868 // Every child will be handled according its table inheritance type
69- \assert ($ child ->getRole () !== null && $ entity !== null && isset ($ parent ));
69+ // todo should $parent be not null?
70+ // \assert(isset($parent));
71+
72+ \assert ($ child ->getRole () !== null && $ entity !== null );
73+
7074 if (!$ registry ->hasEntity ($ child ->getRole ())) {
7175 $ registry ->register ($ child );
7276
Original file line number Diff line number Diff line change 1010/**
1111 * This proxy class doesn't have an {@see Entity} annotation (attribute) declaration,
1212 * and it shouldn't be presented in Schema.
13- * Note: this behavior might be improved. There will be added support for
14- * annotated base class columns without Entity annotation declaration.
13+ * But all the classes that extend this class should contain all the fields from this class.
1514 */
1615class ExecutiveProxy extends Employee
1716{
Original file line number Diff line number Diff line change @@ -115,14 +115,14 @@ public function getDriver(): Driver
115115
116116 public static function singularReadersProvider (): \Traversable
117117 {
118- yield ['reader ' => new AnnotationReader ()];
119- yield ['reader ' => new AttributeReader ()];
118+ yield ['Annotation reader ' => new AnnotationReader ()];
119+ yield ['Attribute reader ' => new AttributeReader ()];
120120 }
121121
122122 public static function allReadersProvider (): \Traversable
123123 {
124124 yield from static ::singularReadersProvider ();
125- yield ['reader ' => new SelectiveReader ([new AttributeReader (), new AnnotationReader ()])];
125+ yield ['Selective reader ' => new SelectiveReader ([new AttributeReader (), new AnnotationReader ()])];
126126 }
127127
128128 protected function getDatabase (): Database
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public function testTableInheritance(ReaderInterface $reader): void
125125 $ this ->assertSame ('secret ' , $ loadedExecutive ->hidden );
126126 $ this ->assertSame (15000 , $ loadedExecutive ->bonus );
127127 $ this ->assertSame ('executive ' , $ loadedExecutive ->getType ());
128- $ this ->assertNull ( $ loadedExecutive ->proxyFieldWithAnnotation );
128+ $ this ->assertSame ( ' value ' , $ loadedExecutive ->proxyFieldWithAnnotation );
129129 }
130130
131131 #[DataProvider('allReadersProvider ' )]
You can’t perform that action at this time.
0 commit comments