-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from moufmouf/findfromsql_orderby_inherited
findFromSql with an orderBy on an inherited table does now work.
- Loading branch information
Showing
7 changed files
with
63 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace TheCodingMachine\TDBM\Dao; | ||
|
||
use TheCodingMachine\TDBM\Test\Dao\Bean\ArticleBean; | ||
use TheCodingMachine\TDBM\Test\Dao\Generated\ArticleBaseDao; | ||
|
||
/** | ||
* The UserDao class will maintain the persistence of UserBean class into the users table. | ||
*/ | ||
class TestArticleDao extends ArticleBaseDao | ||
{ | ||
/** | ||
* Used to test a findFromSql with an order by clause on an inherited table. | ||
* | ||
* @return ArticleBean[] | ||
*/ | ||
public function getArticlesByUserLogin() | ||
{ | ||
return $this->findFromSql( | ||
'article JOIN users ON article.author_id = users.id', | ||
null, | ||
[], | ||
'users.login' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters