我刚刚重新安装了Symfony2和Doctrine.这是全新的.
现在我生成一个实体(称为帐户),放置一些简单的注释,然后想要更新我的模式.然后:
[Doctrine\Common\Persistence\Mapping\MappingException]
Class 'NRtworks\ChartOfAccountsBundle\Entity\Nathan' does not exist
Run Code Online (Sandbox Code Playgroud)
但是我没有叫Nathan的课(好吧,这是我的名字).在我目前拥有的任何软件包中都没有.我有一个这样的但是在另一个Symfony2安装中.
现在,当我创建一个名为"Nathan"的实体时,它可以工作,但随后它会创建一个不相关的模式.
现在我的问题是,学说可以存储"幽灵"实体吗?我试图清除doctrine和Symfony2的所有缓存,但它并没有改变任何东西.
我想这将是一个非常明显的答案我会得到但我真的找不到自己.
这是我的桌子(我饶了你所有的tds)
<table id="COA_Table">
<thead>
<tr>some th</tr>
</thead>
<tbody>
<tr>some TD</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
这是我的jQuery代码:
$(document).ready(function () {
console.log("ready!");
$('#COA_Table > tbody:last').append('<tr><td><input type=\"checkbox\"></td><td></td>New account<td></td><td></td></tr>');
})
Run Code Online (Sandbox Code Playgroud)
并完成,我得到的错误代码:
未捕获的TypeError:无法读取null的属性'childNodes'
这让我很生气
我正在使用 Rechart 的散点图
数据显示正常,但我想要工具提示显示额外的弹出窗口(项目的名称),就像在条形图上一样。我发现我可以完全自定义工具提示,但我想知道是否有更简单的方法?就像一个我不知道如何使用的道具。该文档对于如何使用某些道具不是很明确
这是代码。你可以看到我尝试了datakey和label,但没有成功
<ScatterChart
width={400}
height={400}
margin={{
top: 20, right: 20, bottom: 20, left: 20,
}}
>
<CartesianGrid />
<XAxis type="number" dataKey="sizeMB" name="Size" unit=" MB" />
<YAxis type="number" dataKey="directReferenceCount" name="# of References" unit=" References" />
<Tooltip cursor={{ strokeDasharray: '3 3' }} dataKey={'fullName'} label={'fullName'} />
<Scatter name="Line Item" data={this.props.data} fill="#8884d8">
</Scatter>
</ScatterChart>
Run Code Online (Sandbox Code Playgroud) 当我坚持我的实体时,我收到此错误
另一个"在链配置的命名空间中找不到类'X'
在我将Symfony从Windows移动到Linux之前,这曾经工作过.
我的控制器:
public function SubscriptionHandlingAction(Request $request)
{
if ($request->isMethod('POST'))
{
$form = $this->createForm(new NewCustomer(), new Customer());
$form->bind($request);
if ($form->isValid())
{
// get the form data
$newcustomer = $form->getData();
//get the date and set it in the entity
$datecreation = new \DateTime(date('d-m-Y'));
$newcustomer->setdatecreation($datecreation);
//this works fine
echo $newcustomer->getname();
//persist the data
$em = $this->getDoctrine()->getManager();
$em->persist($newcustomer);
$em->flush();
return $this->render('NRtworksSubscriptionBundle:Subscription:subscription_success.html.twig');
}
Run Code Online (Sandbox Code Playgroud)
当然,我的类实体存在,因为我可以基于它创建表单,对象等.但是,这个实体不是"映射"意味着教义:mapping:info不给我任何东西(但是我手动创建了相应的sdl表并放入所有注释):
<?php
namespace NRtworks\SubscriptionBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="Customer")
*/
class Customer …Run Code Online (Sandbox Code Playgroud) doctrine-orm ×2
symfony ×2
append ×1
doctrine ×1
flush ×1
html-table ×1
jquery ×1
persist ×1
php ×1
recharts ×1