我正在尝试将git-svn用于以下项目:
https://svn.apache.org/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk/
我使用标准git svn clone https://svn.apache.org/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk/ -T trunk -b branches -t tags调用检查了.
我开始使用Git SVN dcommit与有麻烦的git - svn的分支有后git checkout -b,而不是git svn branch,然后合并本地分支到master,并试图dcommit.现在,奇怪的是,即使在做了一次干净的结账之后,当我试图拒绝时,我仍然有错误.
以下相当长的跟踪代表了我当前使用git-svn的工作流程:
jacob@jacob-laptop:~/workspace/gsoc2010/scxml-js$ git svn dcommit
Committing to https://jbeard@svn.apache.org/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk ...
M build-common.xml
M src/xslt/backends/js/StateTableStatechartGenerator.xsl
M src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
M src/xslt/ir-compiler/appendTransitionInformation.xsl
M src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl
M src/xslt/ir-compiler/flattenTransitions.xsl
M src/xslt/ir-compiler/nameTransitions.xsl
M src/xslt/ir-compiler/numberStatesAndTransitions.xsl
M src/xslt/ir-compiler/splitTransitionTargets.xsl
M src/xslt/util/language-frontend-module-generators/sh-from-topo-sort-list-generator.xsl
M src/xslt/util/topo-sort.xsl
Committed r1037491
W: 502073c202cb1fbe089f0e8b7100304f0aa74729 and refs/remotes/trunk differ, using rebase:
:100644 100644 7930fd690be01a5716490704b5556e2b5cab5ba6 51047f2c8cf1daaa94ae44433a9aa2acc222ae43 M build-common.xml
:040000 040000 59251941b33bda1376881b33bb2263ea87b1b947 2f5e2586e26bc7d05def065cfcf05327982b81d7 M src
Current …Run Code Online (Sandbox Code Playgroud) 所以我们都知道Kohana 3的文档绝对是可怕的.那么如何构建以下查询,我有"玩家"和"龙"模型?
SELECT * FROM `dragons` JOIN `players` ON (`dragons`.`player_id` = `players`.`player_id`) WHERE `uid` IN (1,2,3) ORDER BY `dragons`.`id` ASC
Run Code Online (Sandbox Code Playgroud)
我可以ORM::factory('dragon')->join("players")->on("dragons.player_id", "=", "players.player_id")用来进入连接部分,但我不能做这个in条款.inKohana 3的ORM 没有功能.我尝试了这个where函数,但它在第三个参数周围加上引号,所以我的ID列表变成了一个字符串,查询变得无效.那我该怎么办?我无法弄清楚如何将自定义的SQL位添加到我的ORM加载查询中.同样,因为文档不存在.
我现在能想到的唯一方法就是加载所有合适的玩家,循环播放它们并获取它们的龙.但这看起来真的很愚蠢 - 比必要的查询更多.我以前觉得这样,使用ORM会在查询结束时使事情变得非常低效,以便使代码更容易编码.这是真的?
我正在运行Kohana 3,并且很难理解Auth模块,或者即使它是我需要的.基本上我想创建一个基本的用户配置文件站点,具有基本的用户名/密码保护.
如何使用现有的控制器......
class Controller_Profile extends Controller
{
function action_index( $user_id )
{
// User should already be authenticated by here I think
}
}
Run Code Online (Sandbox Code Playgroud)
...并将它们与某种身份验证系统一起使用
我在理解如何使用下面的代码实现DbSelect paginator时遇到了一些麻烦(现在它正在使用Iterator适配器,它不适用于ResultSet).
据我所知,它并不像我希望的那样直截了当.DbSelect期待一个Zend\Db\Sql\Select和一个适配器.适配器是一个非问题,可以使用以下方法检索:
$this->newsContents()->getAdapter()
Run Code Online (Sandbox Code Playgroud)
但我无法Select从我的TableGateway中获取一个对象而不重复我的查询代码.有没有简单的方法来解决这个问题?
NewsController.php
<?php
namespace News\Controller;
use Zend\Paginator\Paginator;
class NewsController extends \Application\Controller\WebsiteController
{
protected $newsTable;
protected $newsContents;
protected function newsTable()
{
return $this->getServiceLocator()->get('News\Model\NewsTable');
}
protected function newsContents()
{
return $this->getServiceLocator()->get('News\Model\NewsContentsTable');
}
protected function articleId()
{
return (int) $this->params()->fromRoute('id');
}
public function articleAction()
{
$article = $this->newsTable()->getArticle($this->articleId());
$pages = $this->newsContents()->getPages($this->articleId());
$paginator = new Paginator(new \Zend\Paginator\Adapter\Iterator($pages));
$paginator->setCurrentPageNumber($this->params()->fromRoute('page'));
return array(
'css' => 'news.css',
'article' => $article,
'paginator' => $paginator,
);
}
}
Run Code Online (Sandbox Code Playgroud)
NewsContentsTable.php
<?php
namespace …Run Code Online (Sandbox Code Playgroud) 如果我想home在Kohana中使用控制器,我可以做到这一点相对简单.
class Controller_Home extends Controller_Base { ... }
Run Code Online (Sandbox Code Playgroud)
但是,如果我想要一个叫做refer_a_friend的话呢?
我不能这样做,因为Kohana将下划线视为目录分隔符.
class Controller_Refer_A_Friend extends Controller_Base { ... }
Run Code Online (Sandbox Code Playgroud)
我能做什么?
kohana ×3
kohana-3 ×2
php ×2
git ×1
git-svn ×1
kohana-auth ×1
orm ×1
svn ×1
tablegateway ×1
zend-db ×1