假设我有一个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)
如何在此处仅加载已批准的评论?
我试图通过以下方式检查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)
请指教 :)
我在这里阅读有关JIRA的REST API的信息:http: //docs.atlassian.com/jira/REST/latest/#id233354
我可以看到有一些方法可以发布问题的附件,以及通过它的ID获取附件的信息.但我找不到可以为我提供特定问题附件列表的电话.
所以我的问题是:JIRA如何将附件与问题联系起来?如何获取特定问题的附件ID列表?
谢谢 :)
实际上,如果我打电话来获取问题信息(完整的问题信息),附件就是一个字段.无论如何感谢阅读:)