public function testUnsetBelongsTo() { $details = BookDetails::selectOne($this->getConn())->where('books_id', 2)->execute(); $this->assertTrue($details->hasRelation('book')); $this->assertSame($details->books_id, $details->book->id); $details->book = 0; $this->assertFalse($details->hasRelation('book')); $this->assertSame(0, $details->books_id); }