小编Tha*_*Pap的帖子

Symfony2中的条件关系

假设我有一个Post实体和一个Comment实体.管理员可以批准或不批准评论(这是数据库中的标志).邮政实体有:

/**
 * @ORM\OneToMany(targetEntity="Comment", mappedBy="post")
 */
protected $comments;
Run Code Online (Sandbox Code Playgroud)

而且我还想要第二个属性,它看起来像:

/**
 * @ORM\OneToMany(targetEntity="Comment", mappedBy="post")
 */
protected $approvedComments;
Run Code Online (Sandbox Code Playgroud)

如何在此处仅加载已批准的评论?

php entity-relationship doctrine symfony

5
推荐指数
1
解决办法
1011
查看次数

如果在apache中的isset蚂蚁失败了

我试图通过以下方式检查ant中是否存在属性:

<target name="test">
    <property name="testproperty" value="1234567890"/>
    <if>
        <isset property="testproperty"/>
        <then>
            <echo message="testproperty exists"/>
        </then>
        <else>
            <echo message="testproperty does not exist"/>
        </else>
    </if>
</target>
Run Code Online (Sandbox Code Playgroud)

结果是消息失败:

build.xml:536: Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
Run Code Online (Sandbox Code Playgroud)

我必须对isset做错了,因为以下顺利运行:

<target name="test">
    <property name="testproperty" value="1234567890"/>
    <echo message="'${testproperty}'"/>
</target>
Run Code Online (Sandbox Code Playgroud)

请指教 :)

apache ant ant-contrib

3
推荐指数
2
解决办法
1万
查看次数

附件列表 - JIRA REST API

我在这里阅读有关JIRA的REST API的信息:http: //docs.atlassian.com/jira/REST/latest/#id233354

我可以看到有一些方法可以发布问题的附件,以及通过它的ID获取附件的信息.但我找不到可以为我提供特定问题附件列表的电话.

所以我的问题是:JIRA如何将附件与问题联系起来?如何获取特定问题的附件ID列表?

谢谢 :)

编辑

实际上,如果我打电话来获取问题信息(完整的问题信息),附件就是一个字段.无论如何感谢阅读:)

jira

1
推荐指数
1
解决办法
3562
查看次数

标签 统计

ant ×1

ant-contrib ×1

apache ×1

doctrine ×1

entity-relationship ×1

jira ×1

php ×1

symfony ×1